diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f505a0ba..b0e115afa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,5 +51,12 @@ jobs: shell: bash run: yarn validator & sleep 3 + - name: Logs + continue-on-error: false + shell: bash + run: yarn validator:logs & sleep 3 + - name: Test run: yarn test + + diff --git a/.gitignore b/.gitignore index 52d3e18d1..f93164841 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ packages/js/.turbo packages/cli/node_modules packages/cli/dist packages/cli/tests/ctx.json +packages/cli/src/customScript.ts packages/cli/.turbo packages/js/.nyc_output packages/cli/.nyc_output diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 9b470b84f..654277048 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,12 +1,231 @@ # @convergence-rfq/cli +## 6.6.2 + +### Major Changes + +- add getRequiredCollateralForSettlement operation + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@7.0.0 + +## 6.6.1 + +### Patch Changes + +- Add clear cache before finding a vacant base asset index +- Updated dependencies + - @convergence-rfq/sdk@6.6.1 + +## 6.6.0 + +### Minor Changes + +- Add user asset functionality, remove duplicated operation to change the existing base asset, add logic to automatically find a vacant base asset index + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.6.0 + +## 6.5.0 + +### Minor Changes + +- Replace risk engine program with a simplified one, add squads integration + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.5.0 + +## 6.4.2 + +### Patch Changes + +- Update some of vault operator actions API +- Updated dependencies + - @convergence-rfq/sdk@6.4.2 + +## 6.4.1 + +### Patch Changes + +- Removed reduntant console log +- Updated dependencies + - @convergence-rfq/sdk@6.4.1 + +## 6.4.0 + +### Minor Changes + +- Add vault operator functionality - an ability to predefine acceptable price for an rfq. User would deposit tokens at the moment of the rfq creation and the settlement would be executed automatically if an acceptable response arrives using a crank bot + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.4.0 + +## 6.3.3 + +### Patch Changes + +- Update max-retries logic +- Updated dependencies + - @convergence-rfq/sdk@6.3.3 + +## 6.3.2 + +### Patch Changes + +- Add max-retries arg to cli and also implement maxRetries logic for retrying sending failed txs to chain again +- Updated dependencies + - @convergence-rfq/sdk@6.3.2 + +## 6.3.1 + +### Patch Changes + +- Add tx-priority-fee argument to cli and modify sdk txPriority to take custom values +- Updated dependencies + - @convergence-rfq/sdk@6.3.1 + +## 6.3.0 + +### Minor Changes + +- Update program ids and add vault operator program + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.3.0 + +## 6.2.1 + +### Patch Changes + +- fix addJupBaseAssets command +- Updated dependencies + - @convergence-rfq/sdk@6.2.1 + +## 6.2.0 + +### Minor Changes + +- Integrate hxro ,collateral req changes + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.2.0 + +## 6.1.0 + +### Minor Changes + +- Remove collateral requirements, add quote spot fees, add spot instrument config, remove operations to unlock collateral or settle defaults + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.1.0 + +## 6.0.1 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.0.1 + +## 6.0.0 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@6.0.0 + +## 4.5.35 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@4.5.35 + +## 4.5.34 + +### Patch Changes + +- fix updateBaseAsset cmd + +## 4.5.33 + +### Patch Changes + +- Add Birdeye support to fetch token prices for adding jup base assets + +## 4.5.32 + +### Patch Changes + +- add additional mint address check for addJupiterTokens check + +## 4.5.31 + +### Patch Changes + +- add update base assets command + +## 4.5.30 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@4.5.30 + +## 4.5.29 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@4.5.29 + +## 4.5.28 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@4.5.28 + +## 4.5.27 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@4.5.27 + +## 4.5.26 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@4.5.26 + +## 4.5.25 + +### Patch Changes + +- Updated dependencies + - @convergence-rfq/sdk@4.5.25 + ## 4.5.24 ### Patch Changes -- Added whitelist - Updated dependencies - - @convergence-rfq/sdk@4.5.24 +- @convergence-rfq/sdk@4.5.24 ## 4.5.22 diff --git a/packages/cli/package.json b/packages/cli/package.json index cdeaf2006..d509aac67 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@convergence-rfq/cli", "description": "Official Convergence CLI", - "version": "4.5.24", + "version": "6.6.2", "license": "MIT", "publishConfig": { "access": "public" @@ -47,7 +47,7 @@ "cli": "ts-node src/index.ts" }, "dependencies": { - "@convergence-rfq/sdk": "4.5.24", + "@convergence-rfq/sdk": "6.6.2", "@solana/web3.js": "^1.87.6", "@types/cookie": "^0.5.1", "commander": "^10.0.0" @@ -61,4 +61,4 @@ "sinon": "^15.0.1", "ts-mocha": "^10.0.0" } -} \ No newline at end of file +} diff --git a/packages/cli/scripts/bootstrap.sh b/packages/cli/scripts/bootstrap.sh index be9e1d569..fa6d70d5f 100755 --- a/packages/cli/scripts/bootstrap.sh +++ b/packages/cli/scripts/bootstrap.sh @@ -4,9 +4,10 @@ set -e export DEVNET="true" -export SPOT_INSTRUMENT="CjQCEjXtG3QNBuT5Z1sctaAYCo5Mt6edftqHQetEPo9w" -export PSYOPTIONS_EUROPEAN_INSTRUMENT="A86fhhdNVDdXV8pB48WXtPeM3EBkcBeJEdrx9xrUo9nF" -export PSYOPTIONS_AMERICAN_INSTRUMENT="6JG1tWK4w6LmjeXbmDZJsmUsPSjgnp74j2XPsTvjjTX8" +export SPOT_INSTRUMENT="4A9M7iojGDPc4n4YDGnTmsYsNKUohG1zM1nrAqVMMmrm" +export PSYOPTIONS_EUROPEAN_INSTRUMENT="6B7TdBNAF7tWWz5sZbbBZj8jH1ix7QWAchtkvMHveEuW" +export PSYOPTIONS_AMERICAN_INSTRUMENT="HGmSFSRfVAG8RC8Ae4G1JFSHK7Au5GrGskDxncG3JRok" +export HXRO_PRINT_TRADE_PROVIDER="4WbVwc5Edfo3oB1n16bVC9qrghYHSNh1qAECbSCyiT95" # Same for devnet and mainnet export BTC_ORACLE_ADDRESS="8SXvChNYFhRq4EZuZvnhjrB3jJRQCv4k3P4W6hesH3Ee" @@ -31,6 +32,12 @@ convergence protocol initialize --collateral-mint=$USDC_MINT --rpc-endpoint=$RPC convergence risk-engine initialize --rpc-endpoint=$RPC_ENDPOINT +convergence protocol add-print-trade-provider --print-trade-provider-program $HXRO_PRINT_TRADE_PROVIDER --settlement-can-expire false --validate-response-account-amount 2 --rpc-endpoint=$RPC_ENDPOINT +convergence hxro initialize-config --valid-mpg $HXRO_MPG --rpc-endpoint=$RPC_ENDPOINT +convergence hxro initialize-operator-trg --rpc-endpoint=$RPC_ENDPOINT + +convergence spot-instrument initialize-config --fee-bps "0.01" --rpc-endpoint=$RPC_ENDPOINT + convergence protocol add-instrument --instrument-program=$SPOT_INSTRUMENT --can-be-used-as-quote=true --validate-data-account-amount=1 --prepare-to-settle-account-amount=7 --settle-account-amount=3 --revert-preparation-account-amount=3 --clean-up-account-amount=4 --rpc-endpoint=$RPC_ENDPOINT convergence protocol add-instrument --instrument-program=$PSYOPTIONS_EUROPEAN_INSTRUMENT --can-be-used-as-quote=false --validate-data-account-amount=2 --prepare-to-settle-account-amount=7 --settle-account-amount=3 --revert-preparation-account-amount=3 --clean-up-account-amount=4 --rpc-endpoint=$RPC_ENDPOINT convergence protocol add-instrument --instrument-program=$PSYOPTIONS_AMERICAN_INSTRUMENT --can-be-used-as-quote=false --validate-data-account-amount=3 --prepare-to-settle-account-amount=7 --settle-account-amount=3 --revert-preparation-account-amount=3 --clean-up-account-amount=4 --rpc-endpoint=$RPC_ENDPOINT @@ -45,8 +52,8 @@ convergence risk-engine set-risk-categories-info --new-value="0.05,1.2,0.06,0.6, convergence risk-engine set-risk-categories-info --new-value="0.05,2.4,0.08,0.8,0.16,1.2,0.32,1.6,0.48,2.0,0.8,2.4,1.2,2.8" --category=high --rpc-endpoint=$RPC_ENDPOINT convergence risk-engine set-risk-categories-info --new-value="0.05,5.0,0.10,1.0,0.20,1.5,0.40,2.0,0.60,2.5,1.0,3.0,1.5,3.5" --category=very-high --rpc-endpoint=$RPC_ENDPOINT -convergence protocol add-base-asset --ticker=BTC --oracle-address=$BTC_ORACLE_ADDRESS --oracle-source=switchboard --rpc-endpoint=$RPC_ENDPOINT -convergence protocol add-base-asset --ticker=SOL --oracle-address=$SOL_ORACLE_ADDRESS --oracle-source=switchboard --rpc-endpoint=$RPC_ENDPOINT +convergence protocol add-base-asset --index=0 --ticker=BTC --oracle-address=$BTC_ORACLE_ADDRESS --oracle-source=switchboard --rpc-endpoint=$RPC_ENDPOINT +convergence protocol add-base-asset --index=1 --ticker=SOL --oracle-address=$SOL_ORACLE_ADDRESS --oracle-source=switchboard --rpc-endpoint=$RPC_ENDPOINT convergence protocol register-mint --mint=$BTC_MINT --base-asset-index=0 --rpc-endpoint=$RPC_ENDPOINT convergence protocol register-mint --mint=$SOL_MINT --base-asset-index=1 --rpc-endpoint=$RPC_ENDPOINT diff --git a/packages/cli/src/actions.ts b/packages/cli/src/actions.ts index 1298dd884..75b8b4183 100644 --- a/packages/cli/src/actions.ts +++ b/packages/cli/src/actions.ts @@ -1,16 +1,25 @@ import { PublicKey, LAMPORTS_PER_SOL } from '@solana/web3.js'; import { token, - toRiskCategoryInfo, - toScenario, devnetAirdrops, - PriceOracle, SpotLegInstrument, SpotQuoteInstrument, + isRiskCategory, + isOracleSource, + addBaseAssetBuilder, + registerMintBuilder, + TransactionBuilder, } from '@convergence-rfq/sdk'; import { createCvg, Opts } from './cvg'; -import { getInstrumentType, getSize } from './helpers'; +import { + fetchBirdeyeTokenPrice, + fetchCoinGeckoTokenPrice, + extractBooleanString, + getSigConfirmation, + getSize, + expirationRetry, +} from './helpers'; import { logPk, logResponse, @@ -21,12 +30,12 @@ import { logTx, logError, logTokenAccount, - logRiskEngineConfig, logRegisteredMint, logCollateral, logToken, logMint, } from './logger'; +import { JupTokenList } from './types'; export const createMint = async (opts: Opts) => { const cvg = await createCvg(opts); @@ -98,13 +107,18 @@ export const mintTo = async (opts: Opts) => { export const initializeProtocol = async (opts: Opts) => { const cvg = await createCvg(opts); try { - const { response, protocol } = await cvg.protocol().initialize({ - collateralMint: new PublicKey(opts.collateralMint), - protocolTakerFee: opts.protocolTakerFee, - protocolMakerFee: opts.protocolMakerFee, - settlementTakerFee: opts.settlementTakerFee, - settlementMakerFee: opts.settlementMakerFee, - }); + const { response, protocol } = await expirationRetry( + () => + cvg.protocol().initialize({ + collateralMint: new PublicKey(opts.collateralMint), + protocolTakerFee: opts.protocolTakerFee, + protocolMakerFee: opts.protocolMakerFee, + settlementTakerFee: opts.settlementTakerFee, + settlementMakerFee: opts.settlementMakerFee, + addAssetFee: Number(opts.addAssetFee), + }), + opts + ); logPk(protocol.address); logResponse(response); } catch (e) { @@ -115,47 +129,147 @@ export const initializeProtocol = async (opts: Opts) => { export const addInstrument = async (opts: Opts) => { const cvg = await createCvg(opts); try { - const { response } = await cvg.protocol().addInstrument({ - authority: cvg.rpc().getDefaultFeePayer(), - instrumentProgram: new PublicKey(opts.instrumentProgram), - canBeUsedAsQuote: opts.canBeUsedAsQuote, - validateDataAccountAmount: opts.validateDataAccountAmount, - prepareToSettleAccountAmount: opts.prepareToSettleAccountAmount, - settleAccountAmount: opts.settleAccountAmount, - revertPreparationAccountAmount: opts.revertPreparationAccountAmount, - cleanUpAccountAmount: opts.cleanUpAccountAmount, - }); + const { response } = await expirationRetry( + () => + cvg.protocol().addInstrument({ + authority: cvg.rpc().getDefaultFeePayer(), + instrumentProgram: new PublicKey(opts.instrumentProgram), + canBeUsedAsQuote: extractBooleanString(opts, 'canBeUsedAsQuote'), + validateDataAccountAmount: opts.validateDataAccountAmount, + prepareToSettleAccountAmount: opts.prepareToSettleAccountAmount, + settleAccountAmount: opts.settleAccountAmount, + revertPreparationAccountAmount: opts.revertPreparationAccountAmount, + cleanUpAccountAmount: opts.cleanUpAccountAmount, + }), + opts + ); + logResponse(response); } catch (e) { logError(e); } }; -export const addBaseAsset = async (opts: Opts) => { +export const addPrintTradeProvider = async (opts: Opts) => { const cvg = await createCvg(opts); try { - const baseAssets = await cvg.protocol().getBaseAssets(); - const { oracleSource } = opts; - - let priceOracle: PriceOracle; - if (oracleSource === 'in-place') { - priceOracle = { - source: 'in-place', - price: opts.oraclePrice, - }; - } else { - priceOracle = { - source: oracleSource, - address: new PublicKey(opts.oracleAddress), - }; - } + const { response } = await expirationRetry( + () => + cvg.protocol().addPrintTradeProvider({ + printTradeProviderProgram: new PublicKey( + opts.printTradeProviderProgram + ), + settlementCanExpire: extractBooleanString( + opts, + 'settlementCanExpire' + ), + validateResponseAccountAmount: opts.validateResponseAccountAmount, + }), + opts + ); + logResponse(response); + } catch (e) { + logError(e); + } +}; +export const addBaseAsset = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { const { response } = await cvg.protocol().addBaseAsset({ authority: cvg.rpc().getDefaultFeePayer(), - index: baseAssets.length, + index: opts.index && Number(opts.index), ticker: opts.ticker, riskCategory: opts.riskCategory, - priceOracle, + oracleSource: opts.oracleSource, + inPlacePrice: opts.inPlacePrice && Number(opts.inPlacePrice), + pythOracle: opts.pythAddress && new PublicKey(opts.pythAddress), + switchboardOracle: + opts.switchboardAddress && new PublicKey(opts.switchboardAddress), + }); + logResponse(response); + } catch (e) { + logError(e); + } +}; + +export const changeBaseAssetParameters = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const { + index, + enabled: enabledOpts, + riskCategory, + oracleSource, + switchboardOracle: switchboardOracleOpts, + pythOracle: pythOracleOpts, + inPlacePrice: inPlacePriceOpts, + strict: strictOpts, + }: { + index: string; + enabled?: string; + riskCategory?: string; + oracleSource?: string; + switchboardOracle?: string; + pythOracle?: string; + inPlacePrice?: string; + strict?: string; + } = opts; + + const parseBool = (value: string | undefined, name: string) => { + switch (value) { + case undefined: + return undefined; + case 'true': + return true; + case 'false': + return false; + default: + throw new Error(`Unrecognized ${name} parameter!`); + } + }; + const enabled = parseBool(enabledOpts, 'enabled'); + const strict = parseBool(strictOpts, 'strict'); + + if (riskCategory !== undefined && !isRiskCategory(riskCategory)) { + throw new Error('Unrecognized risk category parameter!'); + } + + if (oracleSource !== undefined && !isOracleSource(oracleSource)) { + throw new Error('Unrecognized oracle source parameter!'); + } + + let switchboardOracle; + if (switchboardOracleOpts === 'none') { + switchboardOracle = null; + } else if (typeof switchboardOracleOpts === 'string') { + switchboardOracle = new PublicKey(switchboardOracleOpts); + } + + let pythOracle; + if (pythOracleOpts === 'none') { + pythOracle = null; + } else if (typeof pythOracleOpts === 'string') { + pythOracle = new PublicKey(pythOracleOpts); + } + + let inPlacePrice; + if (inPlacePriceOpts !== undefined) { + inPlacePrice = Number(inPlacePriceOpts); + if (inPlacePrice === -1) { + inPlacePrice = null; + } + } + + const { response } = await cvg.protocol().changeBaseAssetParameters({ + index: Number(index), + enabled, + riskCategory, + oracleSource, + switchboardOracle, + pythOracle, + inPlacePrice, + strict, }); logResponse(response); } catch (e) { @@ -172,7 +286,27 @@ export const registerMint = async (opts: Opts) => { }; const cvg = await createCvg(opts); try { - const { response } = await cvg.protocol().registerMint(getMintArgs()); + const { response } = await expirationRetry( + () => cvg.protocol().registerMint(getMintArgs()), + opts + ); + logResponse(response); + } catch (e) { + logError(e); + } +}; + +export const addUserAsset = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const { response } = await expirationRetry( + () => + cvg.protocol().addUserAsset({ + mint: new PublicKey(opts.mint), + ticker: opts.ticker, + }), + opts + ); logResponse(response); } catch (e) { logError(e); @@ -332,105 +466,6 @@ export const getCollateral = async (opts: Opts) => { } }; -// Risk engine - -export const initializeRiskEngine = async (opts: Opts) => { - const cvg = await createCvg(opts); - try { - const { response } = await cvg.riskEngine().initializeConfig({ - collateralMintDecimals: opts.collateralMintDecimals, - minCollateralRequirement: opts.minCollateralRequirement, - collateralForFixedQuoteAmountRfqCreation: - opts.collateralForFixedQuoteAmountRfqCreation, - safetyPriceShiftFactor: opts.safetyPriceShiftFactor, - overallSafetyFactor: opts.overallSafetyFace, - acceptedOracleStaleness: opts.acceptedOracleStaleness, - acceptedOracleConfidenceIntervalPortion: - opts.acceptedOracleConfidenceIntervalPortion, - }); - logResponse(response); - } catch (e) { - logError(e); - } -}; - -export const updateRiskEngine = async (opts: Opts) => { - const cvg = await createCvg(opts); - try { - const { response } = await cvg.riskEngine().updateConfig({ - collateralMintDecimals: opts.collateralMintDecimals, - minCollateralRequirement: opts.minCollateralRequirement, - collateralForFixedQuoteAmountRfqCreation: - opts.collateralForFixedQuoteAmountRfqCreation, - safetyPriceShiftFactor: opts.safetyPriceShiftFactor, - overallSafetyFactor: opts.overallSafetyFace, - acceptedOracleStaleness: opts.acceptedOracleStaleness, - acceptedOracleConfidenceIntervalPortion: - opts.acceptedOracleConfidenceIntervalPortion, - }); - logResponse(response); - } catch (e) { - logError(e); - } -}; -export const closeRiskEngine = async (opts: Opts) => { - const cvg = await createCvg(opts); - try { - const { response } = await cvg.riskEngine().closeConfig(); - logResponse(response); - } catch (e) { - logError(e); - } -}; - -export const getRiskEngineConfig = async (opts: Opts) => { - const cvg = await createCvg(opts); - try { - const config = await cvg.riskEngine().fetchConfig(); - logRiskEngineConfig(config); - } catch (e) { - logError(e); - } -}; - -export const setRiskEngineInstrumentType = async (opts: Opts) => { - const cvg = await createCvg(opts); - try { - const { response } = await cvg.riskEngine().setInstrumentType({ - instrumentProgram: new PublicKey(opts.program), - instrumentType: getInstrumentType(opts.type), - }); - logResponse(response); - } catch (e) { - logError(e); - } -}; - -export const setRiskEngineCategoriesInfo = async (opts: Opts) => { - const newValue = opts.newValue.split(',').map((x: string) => parseFloat(x)); - const cvg = await createCvg(opts); - try { - const { response } = await cvg.riskEngine().setRiskCategoriesInfo({ - changes: [ - { - value: toRiskCategoryInfo(newValue[0], newValue[1], [ - toScenario(newValue[2], newValue[3]), - toScenario(newValue[4], newValue[5]), - toScenario(newValue[6], newValue[7]), - toScenario(newValue[8], newValue[9]), - toScenario(newValue[10], newValue[11]), - toScenario(newValue[12], newValue[13]), - ]), - category: opts.category, - }, - ], - }); - logResponse(response); - } catch (e) { - logError(e); - } -}; - // Devnet and localnet helpers export const airdrop = async (opts: Opts) => { @@ -460,3 +495,102 @@ export const airdropDevnetTokens = async (opts: Opts) => { logError(e); } }; + +export const addBaseAssetsFromJupiter = async (opts: Opts) => { + try { + const cvg = await createCvg(opts); + const { birdeyeApiKey, coinGeckoApiKey } = opts; + const baseAssets = await cvg.protocol().getBaseAssets(); + const registerMints = await cvg.protocol().getRegisteredMints(); + // eslint-disable-next-line no-console + console.log('Base assets:', baseAssets); + const baseAssetsSymbols = baseAssets.map((b) => b.ticker); + const registerMintAddresses = registerMints.map((r) => + r.mintAddress.toBase58() + ); + const baseAssetAddresses = baseAssets.map((b) => b.address.toBase58()); + const res = await fetch('https://token.jup.ag/all'); + const jupTokens: JupTokenList[] = await res.json(); + const jupTokensToAdd = jupTokens.filter( + (t) => + !baseAssetsSymbols.includes(t.symbol) && + !baseAssetAddresses.includes(t.address) && + !registerMintAddresses.includes(t.address.toString()) + ); + + for (const token of jupTokensToAdd) { + try { + const coingeckoId = token?.extensions?.coingeckoId; + let tokenPrice: number | undefined = undefined; + if (coingeckoId && coingeckoId !== '') { + tokenPrice = await fetchCoinGeckoTokenPrice( + coinGeckoApiKey, + coingeckoId + ); + if (!tokenPrice) { + tokenPrice = await fetchBirdeyeTokenPrice( + opts.birdeyeAPIKey, + token.address + ); + } + } else { + tokenPrice = await fetchBirdeyeTokenPrice( + birdeyeApiKey, + token.address + ); + } + + if (tokenPrice === undefined) { + // eslint-disable-next-line no-console + console.log( + 'skipping token: because missing price', + token.symbol, + tokenPrice + ); + continue; + } + // eslint-disable-next-line no-console + console.log('Adding token:', token.symbol, 'with price:', tokenPrice); + + //mint should already exists on mainnet + const { builder: addBaseAssetTxBuilder, baseAssetIndex } = + await addBaseAssetBuilder(cvg, { + authority: cvg.rpc().getDefaultFeePayer(), + ticker: token.symbol, + riskCategory: 'high', + oracleSource: 'in-place', + inPlacePrice: tokenPrice, + }); + // eslint-disable-next-line no-console + console.log('Adding base asset:', token.symbol); + const registerMintTxBuilder = await registerMintBuilder(cvg, { + mint: new PublicKey(token.address), + baseAssetIndex, + }); + + const mergedTxBuiler = TransactionBuilder.make() + .setFeePayer(cvg.rpc().getDefaultFeePayer()) + .add(addBaseAssetTxBuilder) + .add(registerMintTxBuilder); + const output = await mergedTxBuiler.sendAndConfirm(cvg); + logResponse(output.response); + + const signatureStatus = await getSigConfirmation( + cvg.connection, + output.response.signature + ); + const { commitment } = cvg.connection; + if (signatureStatus && signatureStatus === commitment) { + // eslint-disable-next-line no-console + console.log('Transaction confirmed'); + } + } catch (e) { + // eslint-disable-next-line no-console + console.log('error:', e); + continue; + } + } + } catch (e) { + logError(e); + } +}; diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index f636038ef..32f3abd85 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -1,12 +1,13 @@ import { Command } from 'commander'; import { - riskEngineGroup, protocolGroup, collateralGroup, airdropGroup, rfqGroup, tokenGroup, + hxroGroup, + spotInstrumentGroup, } from './groups'; export const makeCli = (): Command => { @@ -14,9 +15,10 @@ export const makeCli = (): Command => { airdropGroup, tokenGroup, protocolGroup, - riskEngineGroup, collateralGroup, rfqGroup, + hxroGroup, + spotInstrumentGroup, ]; const cli = new Command(); diff --git a/packages/cli/src/cvg.ts b/packages/cli/src/cvg.ts index 013ecc6fc..e570dfd85 100644 --- a/packages/cli/src/cvg.ts +++ b/packages/cli/src/cvg.ts @@ -1,17 +1,24 @@ import { readFileSync } from 'fs'; import { Connection, Keypair } from '@solana/web3.js'; import { Convergence, keypairIdentity } from '@convergence-rfq/sdk'; +import { resolveTxPriorityArg } from './helpers'; export type Opts = any; export const createCvg = async (opts: Opts): Promise => { const buffer = JSON.parse(readFileSync(opts.keypairFile, 'utf8')); const user = Keypair.fromSecretKey(new Uint8Array(buffer)); + const txPriorityString: string = opts.txPriorityFee; + + const txPriority = resolveTxPriorityArg(txPriorityString); const cvg = new Convergence( new Connection(opts.rpcEndpoint, { commitment: 'confirmed', }), - { skipPreflight: false } + { + skipPreflight: opts.skipPreflight, + transactionPriority: txPriority, + } ); cvg.use(keypairIdentity(user)); return cvg; diff --git a/packages/cli/src/groups/hxro.ts b/packages/cli/src/groups/hxro.ts new file mode 100644 index 000000000..d2e6ec2c6 --- /dev/null +++ b/packages/cli/src/groups/hxro.ts @@ -0,0 +1,127 @@ +/* eslint-disable no-console */ + +import { Command } from 'commander'; + +import { PublicKey } from '@solana/web3.js'; +import { HxroProductInfo } from '@convergence-rfq/sdk'; +import { addCmd, expirationRetry } from '../helpers'; +import { createCvg, Opts } from '../cvg'; +import { logError, logHxroConfig, logResponse } from '../logger'; + +const initializeConfigCmd = (c: Command) => + addCmd(c, 'initialize-config', 'initializes hxro config', initializeConfig, [ + { + flags: '--valid-mpg ', + description: 'Valid Hxro market product group', + }, + ]); + +const initializeConfig = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const response = await expirationRetry( + () => + cvg.hxro().initializeConfig({ validMpg: new PublicKey(opts.validMpg) }), + opts + ); + logResponse(response); + } catch (e) { + logError(e); + } +}; + +const modifyConfigCmd = (c: Command) => + addCmd(c, 'modify-config', 'modifiess hxro config', modifyConfig, [ + { + flags: '--valid-mpg ', + description: 'Valid Hxro market product group', + }, + ]); + +const modifyConfig = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const response = await expirationRetry( + () => cvg.hxro().modifyConfig({ validMpg: new PublicKey(opts.validMpg) }), + opts + ); + logResponse(response); + } catch (e) { + logError(e); + } +}; + +const displayConfigCmd = (c: Command) => + addCmd(c, 'display-config', 'displays hxro config', displayConfig, []); + +const displayConfig = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const config = await cvg.hxro().fetchConfig(); + logHxroConfig(config); + } catch (e) { + logError(e); + } +}; + +const displayProductsCmd = (c: Command) => + addCmd(c, 'display-products', 'displays hxro products', displayProducts, []); + +const displayProducts = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const products: HxroProductInfo[] = await cvg.hxro().fetchProducts(); + console.log(`Products amount: ${products.length}`); + products.forEach((product) => { + console.log(JSON.stringify(product)); + }); + } catch (e) { + logError(e); + } +}; + +const initializeOperatorTRGCmd = (c: Command) => + addCmd( + c, + 'initialize-operator-trg', + 'initialized a trg for an operator, which is required for hxro settlements', + initializeOperatorTRG, + [ + { + flags: '--hxro-risk-engine ', + description: + 'Overrides hxro risk engine address. Should be used primarely for testing purposes', + defaultValue: '', + }, + ] + ); + +const initializeOperatorTRG = async (opts: Opts) => { + const cvg = await createCvg(opts); + + try { + const hxroRiskEngineAddress = + opts.hxroRiskEngine !== '' + ? new PublicKey(opts.hxroRiskEngine) + : undefined; + const response = await expirationRetry( + () => + cvg.hxro().initializeOperatorTraderRiskGroup({ + hxroRiskEngineAddress, + }), + opts + ); + logResponse(response); + } catch (e) { + logError(e); + } +}; + +export const hxroGroup = (c: Command) => { + const group = c.command('hxro'); + initializeConfigCmd(group); + modifyConfigCmd(group); + displayConfigCmd(group); + initializeOperatorTRGCmd(group); + displayProductsCmd(group); +}; diff --git a/packages/cli/src/groups/index.ts b/packages/cli/src/groups/index.ts index 5d71fa882..59d765cc6 100644 --- a/packages/cli/src/groups/index.ts +++ b/packages/cli/src/groups/index.ts @@ -2,5 +2,6 @@ export * from './airdrop'; export * from './collateral'; export * from './protocol'; export * from './rfq'; -export * from './riskEngine'; export * from './token'; +export * from './hxro'; +export * from './spotInstrument'; diff --git a/packages/cli/src/groups/protocol.ts b/packages/cli/src/groups/protocol.ts index ff6009747..f80cc7b06 100644 --- a/packages/cli/src/groups/protocol.ts +++ b/packages/cli/src/groups/protocol.ts @@ -8,6 +8,10 @@ import { getProtocol, getBaseAssets, closeProtocol, + addPrintTradeProvider, + changeBaseAssetParameters, + addBaseAssetsFromJupiter, + addUserAsset, } from '../actions'; import { addCmd } from '../helpers'; @@ -69,6 +73,11 @@ const initializeProtocolCmd = (c: Command) => description: 'settlement taker fee', defaultValue: '0', }, + { + flags: '--add-asset-fee ', + description: 'add asset fee in sol', + defaultValue: '0', + }, ]); const addInstrumentCmd = (c: Command) => @@ -80,37 +89,118 @@ const addInstrumentCmd = (c: Command) => commonOptions ); +const addPrintTradeProviderCmd = (c: Command) => + addCmd( + c, + 'add-print-trade-provider', + 'adds print trade provider to the protocol', + addPrintTradeProvider, + [ + { + flags: '--print-trade-provider-program ', + description: 'print trade provider program address', + }, + { + flags: '--settlement-can-expire ', + description: 'settlement can expire', + }, + { + flags: '--validate-response-account-amount ', + description: 'amount of account passed to validate response CPI call', + }, + ] + ); + const closeCmd = (c: Command) => addCmd(c, 'close', 'closes protocol configuration', closeProtocol); const addBaseAssetCmd = (c: Command) => addCmd(c, 'add-base-asset', 'adds protocol base asset', addBaseAsset, [ + { + flags: '--index ', + description: 'base asset index', + defaultValue: null, + }, { flags: '--ticker ', description: 'ticker', }, + { + flags: '--risk-category ', + description: 'risk category', + defaultValue: 'medium', + }, { flags: '--oracle-source ', - description: 'oracle source', + description: 'oracle source - in-place | switchboard | pyth,', defaultValue: null, }, { - flags: '--oracle-price ', - description: 'oracle price', + flags: '--switchboard-address ', + description: 'switchboard address', defaultValue: null, }, { - flags: '--oracle-address ', - description: 'oracle address', + flags: '--pyth-address ', + description: 'pyth address', defaultValue: null, }, { - flags: '--risk-category ', - description: 'risk category', - defaultValue: 'medium', + flags: '--in-place-price ', + description: 'in place price', + defaultValue: null, }, ]); +const changeBaseAssetParametersCmd = (c: Command) => + addCmd( + c, + 'change-base-asset-parameters', + 'change existing base asset parameters', + changeBaseAssetParameters, + [ + { + flags: '--index ', + description: 'base asset index', + }, + { + flags: '--enabled ', + description: 'true to enable base asset, false to disable', + defaultValue: null, + }, + { + flags: '--risk-category ', + description: 'risk category', + defaultValue: null, + }, + { + flags: '--oracle-source ', + description: 'oracle source', + defaultValue: null, + }, + { + flags: '--switchboard-oracle ', + description: 'switchboard oracle, none to unset', + defaultValue: null, + }, + { + flags: '--pyth-oracle ', + description: 'pyth oracle, none to unset', + defaultValue: null, + }, + { + flags: '--in-place-price ', + description: 'in place price, -1 to unset', + defaultValue: null, + }, + { + flags: '--strict ', + description: 'true to set asset as strict, false to unset', + defaultValue: null, + }, + ] + ); + const registerMintCmd = (c: Command) => addCmd(c, 'register-mint', 'registers protocol mint', registerMint, [ { flags: '--mint ', description: 'mint address' }, @@ -122,6 +212,15 @@ const registerMintCmd = (c: Command) => }, ]); +const addUserAssetCmd = (c: Command) => + addCmd(c, 'add-user-asset', 'adds user asset', addUserAsset, [ + { flags: '--mint ', description: 'mint address' }, + { + flags: '--ticker ', + description: 'ticker', + }, + ]); + const getRegisteredMintsCmd = (c: Command) => addCmd( c, @@ -136,14 +235,36 @@ const getCmd = (c: Command) => const getBaseAssetsCmd = (c: Command) => addCmd(c, 'get-base-assets', 'gets protocol base assets', getBaseAssets); +const addBaseAssetsFromJupiterCmd = (c: Command) => + addCmd( + c, + 'add-base-asset-from-jupiter', + 'adds baseAssets from jupiter', + addBaseAssetsFromJupiter, + [ + { + flags: '--coin-gecko-api-key ', + description: 'coin gecko api key', + }, + { + flags: '--birdeye-api-key ', + description: 'birdeye api key', + }, + ] + ); + export const protocolGroup = (c: Command) => { const group = c.command('protocol'); initializeProtocolCmd(group); addInstrumentCmd(group); + addPrintTradeProviderCmd(group); addBaseAssetCmd(group); + changeBaseAssetParametersCmd(group); registerMintCmd(group); getRegisteredMintsCmd(group); getCmd(group); getBaseAssetsCmd(group); closeCmd(group); + addBaseAssetsFromJupiterCmd(group); + addUserAssetCmd(group); }; diff --git a/packages/cli/src/groups/riskEngine.ts b/packages/cli/src/groups/riskEngine.ts deleted file mode 100644 index ea48d065a..000000000 --- a/packages/cli/src/groups/riskEngine.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Command } from 'commander'; - -import { - initializeRiskEngine, - getRiskEngineConfig, - updateRiskEngine, - setRiskEngineInstrumentType, - setRiskEngineCategoriesInfo, - closeRiskEngine, -} from '../actions'; -import { addCmd } from '../helpers'; - -const riskEngineOptions = [ - { - flags: '--collateral-mint-decimals ', - description: 'collateral decimals', - defaultValue: '6', - }, - { - flags: '--min-collateral-requirement ', - description: 'collateral for fixed quote amount RFQ creation', - defaultValue: '10000000', - }, - { - flags: '--collateral-for-variable-size-rfq-creation ', - description: 'collateral for variable size RFQ creation', - defaultValue: '10000000', - }, - { - flags: '--collateral-for-fixed-quote-amount-rfq-creation ', - description: 'collateral for fixed quote amount RFQ creation', - defaultValue: '10000000', - }, - { - flags: '--safety-price-shift-factor ', - description: 'safety price shift factor', - defaultValue: '0.01', - }, - { - flags: '--overall-safety-factor ', - description: 'overall safety factor', - defaultValue: '0.1', - }, - { - flags: '--accepted-oracle-staleness ', - description: 'accepted oracle staleness', - defaultValue: '300', - }, - { - flags: '--accepted-oracle-confidence-interval-portion ', - description: 'accepted oracle confidence interval portion', - defaultValue: '0.1', - }, -]; - -const initializeCmd = (c: Command) => - addCmd( - c, - 'initialize', - 'initializes risk engine', - initializeRiskEngine, - riskEngineOptions - ); - -const closeCmd = (c: Command) => - addCmd(c, 'close', 'closes risk engine', closeRiskEngine); - -const updateCmd = (c: Command) => - addCmd( - c, - 'update', - 'updates risk engine', - updateRiskEngine, - riskEngineOptions - ); - -const setInstrumentTypeCmd = (c: Command) => - addCmd( - c, - 'set-instrument-type', - 'sets risk engine instrument type', - setRiskEngineInstrumentType, - [ - { - flags: '--type ', - description: 'instrument type', - }, - { - flags: '--program ', - description: 'instrument program', - }, - ] - ); - -const setCategoriesInfoCmd = (c: Command) => - addCmd( - c, - 'set-risk-categories-info', - 'sets risk engine risk categories info', - setRiskEngineCategoriesInfo, - [ - { - flags: '--category ', - description: 'category', - }, - { - flags: '--new-value ', - description: 'new value', - }, - ] - ); - -const getCmd = (c: Command) => - addCmd(c, 'get', 'gets risk engine config', getRiskEngineConfig); - -export const riskEngineGroup = (c: Command) => { - const group = c.command('risk-engine'); - initializeCmd(group); - closeCmd(group); - updateCmd(group); - setInstrumentTypeCmd(group); - setCategoriesInfoCmd(group); - getCmd(group); -}; diff --git a/packages/cli/src/groups/spotInstrument.ts b/packages/cli/src/groups/spotInstrument.ts new file mode 100644 index 000000000..c47d76b44 --- /dev/null +++ b/packages/cli/src/groups/spotInstrument.ts @@ -0,0 +1,80 @@ +/* eslint-disable no-console */ + +import { Command } from 'commander'; + +import { addCmd, expirationRetry } from '../helpers'; +import { createCvg, Opts } from '../cvg'; +import { logError, logResponse, logSpotInstrumentConfig } from '../logger'; + +const initializeConfigCmd = (c: Command) => + addCmd( + c, + 'initialize-config', + 'initializes spot instrument config', + initializeConfig, + [ + { + flags: '--fee-bps ', + description: 'Quote fees, value of 0.01 means 1%', + }, + ] + ); + +const initializeConfig = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const response = await expirationRetry( + () => cvg.spotInstrument().initializeConfig({ feeBps: opts.feeBps }), + opts + ); + logResponse(response); + } catch (e) { + logError(e); + } +}; + +const modifyConfigCmd = (c: Command) => + addCmd(c, 'modify-config', 'modifiess spot instrument config', modifyConfig, [ + { + flags: '--fee-bps ', + description: 'Quote fees, value of 0.01 means 1%', + }, + ]); + +const modifyConfig = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const response = await cvg + .spotInstrument() + .modifyConfig({ feeBps: opts.feeBps }); + logResponse(response); + } catch (e) { + logError(e); + } +}; + +const displayConfigCmd = (c: Command) => + addCmd( + c, + 'display-config', + 'displays spot instrument config', + displayConfig, + [] + ); + +const displayConfig = async (opts: Opts) => { + const cvg = await createCvg(opts); + try { + const config = await cvg.spotInstrument().fetchConfig(); + logSpotInstrumentConfig(config); + } catch (e) { + logError(e); + } +}; + +export const spotInstrumentGroup = (c: Command) => { + const group = c.command('spot-instrument'); + initializeConfigCmd(group); + modifyConfigCmd(group); + displayConfigCmd(group); +}; diff --git a/packages/cli/src/helpers.ts b/packages/cli/src/helpers.ts index e45fe9cc3..c2f939bb6 100644 --- a/packages/cli/src/helpers.ts +++ b/packages/cli/src/helpers.ts @@ -4,23 +4,14 @@ import { PsyoptionsEuropeanInstrument, LegInstrument, FixedSize, - InstrumentType, + TransactionPriority, } from '@convergence-rfq/sdk'; import { Command } from 'commander'; -import { Instrument } from './types'; +import { Connection } from '@solana/web3.js'; +import { CoinGeckoResponse, Instrument } from './types'; import { DEFAULT_KEYPAIR_FILE, DEFAULT_RPC_ENDPOINT } from './constants'; - -export const getInstrumentType = (type: string): InstrumentType => { - switch (type) { - case 'spot': - return InstrumentType.Spot; - case 'option': - return InstrumentType.Option; - default: - throw new Error('Invalid instrument type'); - } -}; +import { Opts } from './cvg'; export const getSize = (size: string, amount: number): FixedSize => { switch (size) { @@ -61,6 +52,17 @@ export const formatInstrument = (instrument: Instrument): string => { export const addDefaultArgs = (cmd: any) => { cmd.option('--rpc-endpoint ', 'RPC endpoint', DEFAULT_RPC_ENDPOINT); + cmd.option('--skip-preflight', 'skip preflight', false); + cmd.option( + '--tx-priority-fee ', + 'transaction priority fee can be [none : 0 mcLamports , normal : 1 mcLamports, high : 10 mcLamports, turbo : 100 mcLamports, custom : mcLamports]', + 'none' + ); + cmd.option( + '--max-retries ', + 'maximum numbers of retries for sending failed txs', + 0 + ); cmd.option('--keypair-file ', 'keypair file', DEFAULT_KEYPAIR_FILE); cmd.option('--verbose ', 'verbose', false); return cmd; @@ -97,3 +99,120 @@ export const addCmd = ( return cmd; }; + +export const extractBooleanString = (opts: Opts, name: string): boolean => { + const value = opts[name]; + if (value !== 'true' && value !== 'false') { + throw new Error( + `${name} parameter value should be either 'true' or 'false'` + ); + } + + return value === 'true' ? true : false; +}; + +export const getSigConfirmation = async ( + connection: Connection, + tx: string +) => { + const result = await connection.getSignatureStatus(tx, { + searchTransactionHistory: true, + }); + return result?.value?.confirmationStatus; +}; + +export const fetchCoinGeckoTokenPrice = async ( + coinGeckoApiKey: string, + coingeckoId: string +) => { + const tokenPriceResponse = await fetch( + `https://pro-api.coingecko.com/api/v3/simple/price?ids=${coingeckoId}&vs_currencies=usd&x_cg_pro_api_key=${coinGeckoApiKey}` + ); + const tokenPriceJson: CoinGeckoResponse = await tokenPriceResponse.json(); + + if (tokenPriceJson[coingeckoId]?.usd) { + return Number(tokenPriceJson[coingeckoId]?.usd); + } + return undefined; +}; + +export const fetchBirdeyeTokenPrice = async ( + birdeyeApiKey: string, + tokenAddress: string +) => { + const options = { + method: 'GET', + headers: { 'X-API-KEY': birdeyeApiKey }, + }; + + const tokenPriceResponse = await fetch( + `https://public-api.birdeye.so/defi/price?address=${tokenAddress}`, + options + ); + const tokenPriceJson: any = await tokenPriceResponse.json(); + if (tokenPriceJson?.success === true) { + return Number(tokenPriceJson?.data?.value); + } + return undefined; +}; + +export const resolveTxPriorityArg = ( + txPriority: string +): TransactionPriority => { + switch (txPriority) { + case 'none': + return 'none'; + case 'normal': + return 'normal'; + case 'high': + return 'high'; + case 'turbo': + return 'turbo'; + default: + try { + const txPriorityInNumber = Number(txPriority); + if (isNaN(txPriorityInNumber) || txPriorityInNumber < 0) { + return 'none'; + } + return txPriorityInNumber; + } catch (e) { + return 'none'; + } + } +}; + +export const resolveMaxRetriesArg = (maxRetries: string): number => { + const maxRetriesInNumber = Number(maxRetries); + if (isNaN(maxRetriesInNumber) || maxRetriesInNumber < 0) { + return 0; + } + return maxRetriesInNumber; +}; + +export async function expirationRetry( + fn: () => Promise, + opts: Opts +): Promise { + let { maxRetries } = opts; + maxRetries = resolveMaxRetriesArg(maxRetries); + if (maxRetries === 0) return await fn(); + let retryCount = 0; + + while (retryCount < maxRetries) { + try { + return await fn(); + } catch (error) { + if (!isTransactionExpiredBlockheightExceededError(error)) throw error; + retryCount++; + console.error(`Attempt ${retryCount + 1} tx expired. Retrying...`); + } + } + throw new Error('Max Tx Expiration retries exceeded'); +} + +function isTransactionExpiredBlockheightExceededError(error: unknown) { + return ( + error instanceof Error && + error.message.includes('TransactionExpiredBlockheightExceededError') + ); +} diff --git a/packages/cli/src/logger.ts b/packages/cli/src/logger.ts index 9b398b165..3443fea44 100644 --- a/packages/cli/src/logger.ts +++ b/packages/cli/src/logger.ts @@ -13,6 +13,9 @@ import { SpotLegInstrument, PsyoptionsAmericanInstrument, PsyoptionsEuropeanInstrument, + PrintTradeLeg, + HxroPrintTradeProviderConfig, + SpotInstrumentConfig, } from '@convergence-rfq/sdk'; import { formatInstrument, assertInstrument } from './helpers'; @@ -27,18 +30,21 @@ export const logPk = (p: PublicKey): void => l('Address:', p.toString()); export const logTx = (t: string): void => l('Tx:', t); -export const logInstrument = (i: LegInstrument): void => { - assertInstrument(i); - l('Instrument:', formatInstrument(i)); +export const logInstrument = (i: LegInstrument | PrintTradeLeg): void => { l('Amount:', N(i?.getAmount().toString())); l('Side:', i.getSide()); - if (i instanceof SpotLegInstrument) { - l('Decimals:', N(i?.decimals.toString())); - l('Mint:', i.mintAddress.toString()); - } else if (i instanceof PsyoptionsAmericanInstrument) { - l('Decimals:', N(PsyoptionsAmericanInstrument.decimals.toString())); - } else if (i instanceof PsyoptionsEuropeanInstrument) { - l('Decimals:', N(PsyoptionsEuropeanInstrument.decimals.toString())); + + if (i.legType == 'escrow') { + assertInstrument(i); + l('Instrument:', formatInstrument(i)); + if (i instanceof SpotLegInstrument) { + l('Decimals:', N(i?.decimals.toString())); + l('Mint:', i.mintAddress.toString()); + } else if (i instanceof PsyoptionsAmericanInstrument) { + l('Decimals:', N(PsyoptionsAmericanInstrument.decimals.toString())); + } else if (i instanceof PsyoptionsEuropeanInstrument) { + l('Decimals:', N(PsyoptionsEuropeanInstrument.decimals.toString())); + } } }; @@ -51,12 +57,11 @@ export const logBaseAsset = (b: BaseAsset): void => { l('Enabled:', b.enabled); l('Index:', b.index); l('Risk category:', b.riskCategory); - l('Oracle source:', b.priceOracle.source); - if (b.priceOracle.address) { - l('Oracle address:', b.priceOracle.address.toString()); - } else if (b.priceOracle.price) { - l('Oracle price:', b.priceOracle.price.toString()); - } + l('Oracle source:', b.oracleSource); + l('Switchboard oracle:', b.switchboardOracle); + l('Pyth oracle:', b.pythOracle); + l('In place price:', b.inPlacePrice); + l('Strict:', b.strict); }; export const logRegisteredMint = (r: RegisteredMint): void => { @@ -102,23 +107,14 @@ export const logProtocol = (p: Protocol): void => { l(`Maker fee: ${p.settleFees.makerBps.toString()} bps`); l(`Taker default fee: ${p.defaultFees.takerBps.toString()} bps`); l(`Maker default fee: ${p.defaultFees.makerBps.toString()} bps`); + l('Registered instruments:', p.instruments.length); p.instruments.map(logProtocolInstrument); -}; - -export const logRiskEngineConfig = (r: any): void => { - l('Address:', r.address.toString()); - l( - 'Minimal collateral requirement:', - N(r.minCollateralRequirement.toString()) - ); - l( - 'Collateral for fixed quote amount RFQ creation:', - N(r.collateralForFixedQuoteAmountRfqCreation.toString()) - ); - l('Collateral mint decimals:', N(r.collateralMintDecimals.toString())); - l('Safety price shift factor:', N(r.safetyPriceShiftFactor.toString())); - l('Overall safety factor:', r.overallSafetyFactor); - r.riskCategoriesInfo.map(logRiskCategoryInfo); + l('Registered print trade providers:', p.printTradeProviders.length); + p.printTradeProviders.map((x) => { + l('Print trade provider address:', x.programKey.toString()); + l('Settlement can expire:', x.settlementCanExpire); + l('Validate response account amount:', x.validateResponseAccountAmount); + }); }; export const logRiskCategoryInfo = (c: any): void => { @@ -148,7 +144,9 @@ export const logRfq = (r: Rfq) => { l('Taker:', r.taker.toString()); l('Order type:', r.orderType); l('Size:', r.size.type === 'open' ? 'open' : 'fixed'); - l('Quote asset:', r.quoteMint.toString()); + if (r.model === 'escrowRfq') { + /* empty */ + } l('Created:', new Date(created).toString()); l(`Active window: ${r.activeWindow} seconds`); l(`Settlement window: ${r.settlingWindow} seconds`); @@ -157,4 +155,20 @@ export const logRfq = (r: Rfq) => { l('Total responses:', r.totalResponses); l('Confirmed responses:', r.confirmedResponses); l('Cleared responses:', r.clearedResponses); + if (r.model === 'printTradeRfq') { + l( + 'Print trade provider:', + r.printTrade.getPrintTradeProviderProgramId().toString() + ); + } +}; + +export const logHxroConfig = (d: HxroPrintTradeProviderConfig) => { + l('Address:', d.address.toString()); + l('Valid Hxro market product group:', d.validMpg.toString()); +}; + +export const logSpotInstrumentConfig = (d: SpotInstrumentConfig) => { + l('Address:', d.address.toString()); + l('Quote fees:', d.feeBps.toString()); }; diff --git a/packages/cli/src/types.ts b/packages/cli/src/types.ts index f15f954f1..3d1aaa9bc 100644 --- a/packages/cli/src/types.ts +++ b/packages/cli/src/types.ts @@ -8,3 +8,22 @@ export type Instrument = | SpotLegInstrument | PsyoptionsAmericanInstrument | PsyoptionsEuropeanInstrument; + +export type JupTokenList = { + address: string; + chainId: number; + decimals: number; + name: string; + symbol: string; + logoURI: string; + tags: string[]; + extensions: { + coingeckoId: string; + }; +}; + +export type CoinGeckoResponse = { + [key: string]: { + usd: number; + }; +}; diff --git a/packages/cli/tests/helpers.ts b/packages/cli/tests/helpers.ts index c81836904..f3b5e82b7 100644 --- a/packages/cli/tests/helpers.ts +++ b/packages/cli/tests/helpers.ts @@ -9,6 +9,7 @@ export const CTX = new Ctx(); export const COLLATERAL_MINT = CTX.collateralMint; export const SWITCHBOARD_BTC_ORACLE = CTX.switchboardBTCOracle; export const PYTH_SOL_ORACLE = CTX.pythSOLOracle; +export const HXRO_MPG = CTX.hxroMpg; export const runCli = async (args: string[], user = 'dao') => { return await makeCli().parseAsync( diff --git a/packages/cli/tests/unit/hxro.spec.ts b/packages/cli/tests/unit/hxro.spec.ts new file mode 100644 index 000000000..922c0d533 --- /dev/null +++ b/packages/cli/tests/unit/hxro.spec.ts @@ -0,0 +1,38 @@ +import { expect } from 'expect'; +import sinon, { SinonStub } from 'sinon'; + +import { ADDRESS_LABEL, HXRO_MPG, TX_LABEL, runCli } from '../helpers'; +import { HXRO_RISK_ENGINE } from '../../../validator'; + +describe('unit.hxro', () => { + let stub: SinonStub; + + beforeEach(() => { + stub = sinon.stub(console, 'log'); + }); + + afterEach(() => { + stub.restore(); + }); + + it('display config', async () => { + await runCli(['hxro', 'display-config']); + expect(stub.args[0][0]).toEqual(ADDRESS_LABEL); + expect(stub.args[1][0]).toEqual('Valid Hxro market product group:'); + }); + + it('modify config', async () => { + await runCli(['hxro', 'modify-config', '--valid-mpg', HXRO_MPG.toString()]); + expect(stub.args[0][0]).toEqual(TX_LABEL); + }); + + it('initialize operator TRG', async () => { + await runCli([ + 'hxro', + 'initialize-operator-trg', + '--hxro-risk-engine', + HXRO_RISK_ENGINE, + ]); + expect(stub.args[0][0]).toEqual(TX_LABEL); + }); +}); diff --git a/packages/cli/tests/unit/protocol.spec.ts b/packages/cli/tests/unit/protocol.spec.ts index 5fbe4d0cc..a3b9c77fd 100644 --- a/packages/cli/tests/unit/protocol.spec.ts +++ b/packages/cli/tests/unit/protocol.spec.ts @@ -4,6 +4,7 @@ import sinon, { SinonStub } from 'sinon'; import { PROGRAM_ADDRESS as SPOT_INSTRUMENT_PROGRAM_ADDRESS } from '@convergence-rfq/spot-instrument'; import { PROGRAM_ADDRESS as PSYOPTIONS_AMERICAN_INSTRUMENT_PROGRAM_ADDRESS } from '@convergence-rfq/psyoptions-american-instrument'; import { PROGRAM_ADDRESS as PSYOPTIONS_EUROPEAN_INSTRUMENT_PROGRAM_ADDRESS } from '@convergence-rfq/psyoptions-european-instrument'; +import { PROGRAM_ADDRESS as HXRO_PRINT_TRADE_PROVIDER_PROGRAM_ADDRESS } from '@convergence-rfq/hxro-print-trade-provider'; import { ADDRESS_LABEL, @@ -51,6 +52,8 @@ describe('unit.protocol', () => { 'initialize', '--collateral-mint', COLLATERAL_MINT, + '--add-asset-fee', + '1', ]); expect(stub.args[0][0]).toEqual(ADDRESS_LABEL); }); @@ -68,7 +71,7 @@ describe('unit.protocol', () => { '--prepare-to-settle-account-amount', '7', '--settle-account-amount', - '3', + '5', '--revert-preparation-account-amount', '3', '--clean-up-account-amount', @@ -121,6 +124,20 @@ describe('unit.protocol', () => { expect(stub.args[0][0]).toEqual(TX_LABEL); }); + it('add-print-trade-provider [hxro]', async () => { + await runCli([ + 'protocol', + 'add-print-trade-provider', + '--print-trade-provider-program', + HXRO_PRINT_TRADE_PROVIDER_PROGRAM_ADDRESS, + '--settlement-can-expire', + 'false', + '--validate-response-account-amount', + '2', + ]); + expect(stub.args[0][0]).toEqual(TX_LABEL); + }); + it('add-base-asset [switchboard]', async () => { // TODO: Add Pyth and In Place Price Oracle await runCli([ @@ -130,7 +147,7 @@ describe('unit.protocol', () => { 'GOD', '--oracle-source', 'switchboard', - '--oracle-address', + '--switchboard-address', SWITCHBOARD_BTC_ORACLE, ]); expect(stub.args[0][0]).toEqual(TX_LABEL); @@ -144,12 +161,28 @@ describe('unit.protocol', () => { 'DOG', '--oracle-source', 'in-place', - '--oracle-price', + '--in-place-price', '101', ]); expect(stub.args[0][0]).toEqual(TX_LABEL); }); + it('change-base-asset [switchboard]', async () => { + await runCli([ + 'protocol', + 'change-base-asset-parameters', + '--index', + '0', + '--enabled', + 'true', + '--in-place-price', + '42', + '--strict', + 'true', + ]); + expect(stub.args[0][0]).toEqual(TX_LABEL); + }); + it('add-base-asset [pyth]', async () => { await runCli([ 'protocol', @@ -158,12 +191,25 @@ describe('unit.protocol', () => { 'ODG', '--oracle-source', 'pyth', - '--oracle-address', + '--pyth-address', PYTH_SOL_ORACLE, ]); expect(stub.args[0][0]).toEqual(TX_LABEL); }); + it('add-user-asset', async () => { + await runCli(['token', 'create-mint', '--decimals', '3']); + await runCli([ + 'protocol', + 'add-user-asset', + '--ticker', + 'TEST', + '--mint', + stub.args[0][1], + ]); + expect(stub.args[1][0]).toEqual(TX_LABEL); + }); + it('get-registered-mints', async () => { await runCli(['protocol', 'get-registered-mints']); expect(stub.args[0][0]).toEqual(ADDRESS_LABEL); diff --git a/packages/cli/tests/unit/riskEngine.spec.ts b/packages/cli/tests/unit/riskEngine.spec.ts deleted file mode 100644 index 43e17389c..000000000 --- a/packages/cli/tests/unit/riskEngine.spec.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { expect } from 'expect'; -import sinon, { SinonStub } from 'sinon'; -import { PROGRAM_ADDRESS as SPOT_INSTRUMENT } from '@convergence-rfq/spot-instrument'; -import { PROGRAM_ADDRESS as PSYOPTIONS_AMERICAN_INSTRUMENT } from '@convergence-rfq/psyoptions-american-instrument'; -import { PROGRAM_ADDRESS as PSYOPTIONS_EUROPEAN_INSTRUMENT } from '@convergence-rfq/psyoptions-european-instrument'; - -import { ADDRESS_LABEL, TX_LABEL, runCli } from '../helpers'; - -describe('unit.riskEngine', () => { - let stub: SinonStub; - - beforeEach(() => { - stub = sinon.stub(console, 'log'); - }); - - afterEach(() => { - stub.restore(); - }); - - it('get', async () => { - await runCli(['risk-engine', 'get']); - expect(stub.args[0][0]).toEqual(ADDRESS_LABEL); - }); - - it('update', async () => { - await runCli(['risk-engine', 'update']); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('close', async () => { - await runCli(['risk-engine', 'close']); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('initialize', async () => { - await runCli(['risk-engine', 'initialize']); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-instrument-type [spot]', async () => { - await runCli([ - 'risk-engine', - 'set-instrument-type', - '--program', - SPOT_INSTRUMENT, - '--type', - 'spot', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-instrument-type [psyoptions european]', async () => { - await runCli([ - 'risk-engine', - 'set-instrument-type', - '--program', - PSYOPTIONS_EUROPEAN_INSTRUMENT, - '--type', - 'option', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-instrument-type [psyoptions american]', async () => { - await runCli([ - 'risk-engine', - 'set-instrument-type', - '--program', - PSYOPTIONS_AMERICAN_INSTRUMENT, - '--type', - 'option', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-risk-categories-info [very low]', async () => { - await runCli([ - 'risk-engine', - 'set-risk-categories-info', - '--category', - 'very-low', - '--new-value', - '0.05,0.5,0.02,0.2,0.04,0.3,0.08,0.4,0.12,0.5,0.2,0.6,0.3,0.7', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-risk-categories-info [low]', async () => { - await runCli([ - 'risk-engine', - 'set-risk-categories-info', - '--category', - 'low', - '--new-value', - '0.05,0.8,0.04,0.4,0.08,0.6,0.16,0.8,0.24,1.0,0.4,1.2,0.6,1.4', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-risk-categories-info [medium]', async () => { - await runCli([ - 'risk-engine', - 'set-risk-categories-info', - '--category', - 'medium', - '--new-value', - '0.05,1.2,0.06,0.6,0.12,0.9,0.24,1.2,0.36,1.5,0.6,1.8,0.9,2.1', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-risk-categories-info [high]', async () => { - await runCli([ - 'risk-engine', - 'set-risk-categories-info', - '--category', - 'high', - '--new-value', - '0.05,2.4,0.08,0.8,0.16,1.2,0.32,1.6,0.48,2.0,0.8,2.4,1.2,2.8', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); - - it('set-risk-categories-info [very high]', async () => { - await runCli([ - 'risk-engine', - 'set-risk-categories-info', - '--category', - 'very-high', - '--new-value', - '0.05,5.0,0.10,1.0,0.20,1.5,0.40,2.0,0.60,2.5,1.0,3.0,1.5,3.5', - ]); - expect(stub.args[0][0]).toEqual(TX_LABEL); - }); -}); diff --git a/packages/cli/tests/unit/spotInstrument.spec.ts b/packages/cli/tests/unit/spotInstrument.spec.ts new file mode 100644 index 000000000..449d5a378 --- /dev/null +++ b/packages/cli/tests/unit/spotInstrument.spec.ts @@ -0,0 +1,27 @@ +import { expect } from 'expect'; +import sinon, { SinonStub } from 'sinon'; + +import { ADDRESS_LABEL, TX_LABEL, runCli } from '../helpers'; + +describe('unit.spotInstrument', () => { + let stub: SinonStub; + + beforeEach(() => { + stub = sinon.stub(console, 'log'); + }); + + afterEach(() => { + stub.restore(); + }); + + it('display config', async () => { + await runCli(['spot-instrument', 'display-config']); + expect(stub.args[0][0]).toEqual(ADDRESS_LABEL); + expect(stub.args[1][0]).toEqual('Quote fees:'); + }); + + it('modify config', async () => { + await runCli(['spot-instrument', 'modify-config', '--fee-bps', '0.01']); + expect(stub.args[0][0]).toEqual(TX_LABEL); + }); +}); diff --git a/packages/js/CHANGELOG.md b/packages/js/CHANGELOG.md index 6729d18b6..39c572435 100644 --- a/packages/js/CHANGELOG.md +++ b/packages/js/CHANGELOG.md @@ -1,10 +1,149 @@ # @convergence-rfq/sdk +## 6.6.2 + +### Major Changes + +- add getRequiredCollateralForSettlement operation + +## 6.6.1 + +### Patch Changes + +- Add clear cache before finding a vacant base asset index + +## 6.6.0 + +### Minor Changes + +- Add user asset functionality, remove duplicated operation to change the existing base asset, add logic to automatically find a vacant base asset index + +## 6.5.0 + +### Minor Changes + +- Replace risk engine program with a simplified one, add squads integration + +## 6.4.2 + +### Patch Changes + +- Update some of vault operator actions API + +## 6.4.1 + +### Patch Changes + +- Removed reduntant console log + +## 6.4.0 + +### Minor Changes + +- Add vault operator functionality - an ability to predefine acceptable price for an rfq. User would deposit tokens at the moment of the rfq creation and the settlement would be executed automatically if an acceptable response arrives using a crank bot + +## 6.3.3 + +### Patch Changes + +- Update max-retries logic + +## 6.3.2 + +### Patch Changes + +- Add max-retries arg to cli and also implement maxRetries logic for retrying sending failed txs to chain again + +## 6.3.1 + +### Patch Changes + +- Add tx-priority-fee argument to cli and modify sdk txPriority to take custom values + +## 6.3.0 + +### Minor Changes + +- Update program ids and add vault operator program + +## 6.2.1 + +### Patch Changes + +- fix addJupBaseAssets command + +## 6.2.0 + +### Minor Changes + +- Integrate hxro ,collateral req changes + +## 6.1.0 + +### Minor Changes + +- Remove collateral requirements, add quote spot fees, add spot instrument config, remove operations to unlock collateral or settle defaults + +## 6.0.1 + +### Patch Changes + +- update cpl packages + +## 6.0.0 + +### Minor Changes + +- Hxro integration + +## 4.5.35 + +### Patch Changes + +- fix collateral calculation for in-place price oracles + +## 4.5.30 + +### Patch Changes + +- add UpdateBaseAsset operation to sdk + +## 4.5.29 + +### Patch Changes + +- Optimize Whitelist creation logic for sigle signature on user side + +## 4.5.28 + +### Patch Changes + +- Update SDK with CPL whitelist changes + +## 4.5.27 + +### Patch Changes + +- revoke NoopWallet logic and use this instead of CvgWallet while creating programs + +## 4.5.26 + +### Patch Changes + +- Add Priority Fees to sdk + +## 4.5.25 + +### Patch Changes + +- Update CPL packages and add updated programs in fixtures + (cpl ref : adding validation for whitelst in respond_to_rfq ix) + ## 4.5.24 ### Patch Changes -- Added whitelist +- add Whitelist feature to SDK ## 4.5.22 diff --git a/packages/js/package.json b/packages/js/package.json index 266675daa..57c6805b8 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -1,7 +1,7 @@ { "name": "@convergence-rfq/sdk", "description": "Official Convergence RFQ SDK", - "version": "4.5.24", + "version": "6.6.2", "license": "MIT", "publishConfig": { "access": "public" @@ -48,15 +48,20 @@ }, "dependencies": { "@aws-crypto/sha256-js": "3.0.0", + "@babel/plugin-syntax-import-attributes": "^7.23.3", "@bundlr-network/client": "^0.8.8", "@convergence-rfq/beet": "0.7.10", "@convergence-rfq/beet-solana": "0.4.11", - "@convergence-rfq/psyoptions-american-instrument": "2.3.1", - "@convergence-rfq/psyoptions-european-instrument": "2.3.1", - "@convergence-rfq/rfq": "2.3.1", - "@convergence-rfq/risk-engine": "2.3.1", - "@convergence-rfq/spot-instrument": "2.3.1", - "@coral-xyz/borsh": "^0.26.0", + "@convergence-rfq/hxro-print-trade-provider": "3.11.0", + "@convergence-rfq/psyoptions-american-instrument": "3.11.0", + "@convergence-rfq/psyoptions-european-instrument": "3.11.0", + "@convergence-rfq/rfq": "3.11.0", + "@convergence-rfq/risk-engine": "3.11.0", + "@convergence-rfq/spot-instrument": "3.11.0", + "@convergence-rfq/vault-operator": "^3.11.0", + "@coral-xyz/anchor": "^0.28.0", + "@coral-xyz/borsh": "^0.28.0", + "@hxronetwork/dexterity-ts": "1.6.16", "@mithraic-labs/psy-american": "^0.2.3", "@mithraic-labs/tokenized-euros": "^0.2.3", "@noble/ed25519": "^1.7.1", @@ -64,6 +69,7 @@ "@project-serum/anchor": "^0.26.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.87.6", + "@sqds/multisig": "^2.1.1", "@types/uuid": "^9.0.1", "big.js": "^6.2.1", "bignumber.js": "^9.0.2", diff --git a/packages/js/src/Convergence.ts b/packages/js/src/Convergence.ts index 472996fff..3108eff55 100644 --- a/packages/js/src/Convergence.ts +++ b/packages/js/src/Convergence.ts @@ -5,21 +5,25 @@ import { resolveClusterFromConnection, } from './types'; import { corePlugins } from './plugins/corePlugins'; +import { TransactionPriority } from './utils'; export type ConvergenceOptions = { cluster?: Cluster; skipPreflight?: boolean; + transactionPriority?: TransactionPriority; }; export class Convergence { public readonly connection: Connection; public readonly cluster: Cluster; public readonly skipPreflight: boolean; + public readonly transactionPriority: TransactionPriority; constructor(connection: Connection, options: ConvergenceOptions = {}) { this.connection = connection; this.cluster = options.cluster ?? resolveClusterFromConnection(connection); this.skipPreflight = options.skipPreflight ?? false; + this.transactionPriority = options.transactionPriority ?? 'none'; this.use(corePlugins()); } diff --git a/packages/js/src/constants.ts b/packages/js/src/constants.ts new file mode 100644 index 000000000..066a98d65 --- /dev/null +++ b/packages/js/src/constants.ts @@ -0,0 +1,8 @@ +export const TRANSACTION_PRIORITY_FEE_MAP = { + none: 0, + normal: 1, + high: 10, + turbo: 100, +}; + +export const HXRO_COLLATERAL_LOG_INDEX = 7; diff --git a/packages/js/src/index.ts b/packages/js/src/index.ts index 02617931d..eda7eb187 100644 --- a/packages/js/src/index.ts +++ b/packages/js/src/index.ts @@ -3,3 +3,4 @@ export * from './plugins'; export * from './types'; export * from './utils'; export * from './Convergence'; +export * from './constants'; diff --git a/packages/js/src/plugins/collateralModule/operations/fundCollateral.ts b/packages/js/src/plugins/collateralModule/operations/fundCollateral.ts index 29509ebbd..823fbc8ff 100644 --- a/packages/js/src/plugins/collateralModule/operations/fundCollateral.ts +++ b/packages/js/src/plugins/collateralModule/operations/fundCollateral.ts @@ -18,7 +18,6 @@ import { addDecimals } from '../../../utils/conversions'; import { Convergence } from '../../../Convergence'; import { protocolCache } from '../../protocolModule/cache'; import { collateralMintCache } from '../cache'; - const Key = 'FundCollateralOperation' as const; /** @@ -161,6 +160,7 @@ export const fundCollateralBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createFundCollateralInstruction( { diff --git a/packages/js/src/plugins/collateralModule/operations/initializeCollateral.ts b/packages/js/src/plugins/collateralModule/operations/initializeCollateral.ts index 38420c822..ae0bbff3e 100644 --- a/packages/js/src/plugins/collateralModule/operations/initializeCollateral.ts +++ b/packages/js/src/plugins/collateralModule/operations/initializeCollateral.ts @@ -198,6 +198,7 @@ export const initializeCollateralBuilder = async ( return TransactionBuilder.make() .setFeePayer(user) + .addTxPriorityFeeIx(convergence) .add({ instruction: createInitializeCollateralInstruction( { diff --git a/packages/js/src/plugins/collateralModule/operations/withdrawCollateral.ts b/packages/js/src/plugins/collateralModule/operations/withdrawCollateral.ts index 0789dfc8b..11e11d315 100644 --- a/packages/js/src/plugins/collateralModule/operations/withdrawCollateral.ts +++ b/packages/js/src/plugins/collateralModule/operations/withdrawCollateral.ts @@ -184,6 +184,7 @@ export const withdrawCollateralBuilder = async ( return TransactionBuilder.make() .setFeePayer(user) + .addTxPriorityFeeIx(convergence) .add({ instruction: createWithdrawCollateralInstruction( { diff --git a/packages/js/src/plugins/corePlugins/plugin.ts b/packages/js/src/plugins/corePlugins/plugin.ts index ccb006f36..20da56528 100644 --- a/packages/js/src/plugins/corePlugins/plugin.ts +++ b/packages/js/src/plugins/corePlugins/plugin.ts @@ -15,7 +15,10 @@ import { instrumentModule } from '../instrumentModule'; import { psyoptionsEuropeanInstrumentModule } from '../psyoptionsEuropeanInstrumentModule'; import { psyoptionsAmericanInstrumentModule } from '../psyoptionsAmericanInstrumentModule'; import { spotInstrumentModule } from '../spotInstrumentModule'; +import { hxroModule } from '../hxroPrintTradeProviderModule'; +import { printTradeModule } from '../printTradeModule'; import { whitelistModule } from '../whitelistModule'; +import { vaultOperatorModule } from '../vaultOperatorModule'; export const corePlugins = () => ({ install(convergence: Convergence) { @@ -38,11 +41,14 @@ export const corePlugins = () => ({ convergence.use(riskEngineModule()); convergence.use(accountModule()); convergence.use(whitelistModule()); + convergence.use(vaultOperatorModule()); // Integrations convergence.use(instrumentModule()); + convergence.use(printTradeModule()); convergence.use(spotInstrumentModule()); convergence.use(psyoptionsEuropeanInstrumentModule()); convergence.use(psyoptionsAmericanInstrumentModule()); + convergence.use(hxroModule()); }, }); diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/accounts.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/accounts.ts new file mode 100644 index 000000000..7f46d86ea --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/accounts.ts @@ -0,0 +1,18 @@ +import { Config } from '@convergence-rfq/hxro-print-trade-provider'; + +import { + Account, + getAccountParsingAndAssertingFunction, + getAccountParsingFunction, +} from '../../types'; + +/** @group Accounts */ +export type HxroPrintTradeProviderConfigAccount = Account; + +/** @group Account Helpers */ +export const parseHxroPrintTradeProviderConfigAccount = + getAccountParsingFunction(Config); + +/** @group Account Helpers */ +export const toHxroPrintTradeProviderConfigAccount = + getAccountParsingAndAssertingFunction(Config); diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/cache.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/cache.ts new file mode 100644 index 000000000..23f74050a --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/cache.ts @@ -0,0 +1,34 @@ +import dexterity from '@hxronetwork/dexterity-ts'; +import { toHxroPrintTradeProviderConfig } from './models'; +import { toHxroPrintTradeProviderConfigAccount } from './accounts'; +import { Convergence } from '@/Convergence'; +import { CvgWallet, useCache } from '@/utils'; + +export const configCache = useCache( + async (cvg: Convergence, commitment = 'confirmed') => { + const configAddress = cvg.hxro().pdas().config(); + const account = await cvg.rpc().getAccount(configAddress, commitment); + const configAccount = toHxroPrintTradeProviderConfigAccount(account); + + return toHxroPrintTradeProviderConfig(configAccount); + } +); + +export const hxroManifestCache = useCache(async (cvg: Convergence) => { + // dexterity.getManifest adds a lot of clutter to logs, so we disable console.debug for this call + // TODO: remove this workaround when dexterity library is updated + const { debug } = console; + console.debug = () => {}; + let manifest: any; // dexterity doesn't export a type for a manifest + try { + manifest = await dexterity.getManifest( + cvg.connection.rpcEndpoint, + true, + new CvgWallet(cvg) + ); + } finally { + console.debug = debug; + } + + return manifest; +}); diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/client.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/client.ts new file mode 100644 index 000000000..a9caafca5 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/client.ts @@ -0,0 +1,109 @@ +import { + FetchHxroPrintTradeProviderConfigInput, + FetchHxroPrintTradeProviderConfigOutput, + FetchHxroProductsInput, + FetchHxroProductsOutput, + InitializeHxroConfigInput, + InitializeHxroConfigOutput, + InitializeOperatorTraderRiskGroupInput, + InitializeOperatorTraderRiskGroupOutput, + ModifyHxroConfigInput, + ModifyHxroConfigOutput, + fetchHxroPrintTradeProviderConfigOperation, + fetchHxroProductsOperation, + initializeHxroConfigOperation, + initializeOperatorTraderRiskGroupOperation, + fetchUnusedCollateralLockRecordsOperation, + FetchUnusedCollateralLockRecordsInput, + FetchUnusedCollateralLockRecordsOutput, + unlockHxroCollateralByRecordOperation, + UnlockHxroCollateralByRecordInput, + UnlockHxroCollateralByRecordOutput, + modifyHxroConfigOperation, + GetRequiredHxroCollateralForSettlementInput, + GetRequiredHxroCollateralForSettlementOutput, + getRequiredHxroCollateralForSettlementOperation, +} from './operations'; +import { HxroPdasClient } from './pdas'; +import { OperationOptions } from '@/types'; +import { Convergence } from '@/Convergence'; + +export class HxroClient { + constructor(protected readonly cvg: Convergence) {} + + pdas() { + return new HxroPdasClient(this.cvg); + } + + fetchConfig( + input?: FetchHxroPrintTradeProviderConfigInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(fetchHxroPrintTradeProviderConfigOperation(input), options); + } + + fetchProducts( + input?: FetchHxroProductsInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(fetchHxroProductsOperation(input), options); + } + + initializeConfig( + input: InitializeHxroConfigInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(initializeHxroConfigOperation(input), options); + } + + modifyConfig( + input: ModifyHxroConfigInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(modifyHxroConfigOperation(input), options); + } + + initializeOperatorTraderRiskGroup( + input: InitializeOperatorTraderRiskGroupInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(initializeOperatorTraderRiskGroupOperation(input), options); + } + + fetchUnusedCollateralLockRecords( + input?: FetchUnusedCollateralLockRecordsInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(fetchUnusedCollateralLockRecordsOperation(input), options); + } + + unlockCollateralByRecord( + input: UnlockHxroCollateralByRecordInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(unlockHxroCollateralByRecordOperation(input), options); + } + + getRequiredCollateralForSettlement( + input: GetRequiredHxroCollateralForSettlementInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(getRequiredHxroCollateralForSettlementOperation(input), options); + } +} diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/constants.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/constants.ts new file mode 100644 index 000000000..c49612ebb --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/constants.ts @@ -0,0 +1,2 @@ +export const HXRO_QUOTE_DECIMALS = 9; +export const HXRO_LEG_DECIMALS = 9; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/dex.json b/packages/js/src/plugins/hxroPrintTradeProviderModule/dex.json new file mode 100644 index 000000000..e50bf8d58 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/dex.json @@ -0,0 +1,4605 @@ +{ + "version": "0.1.0", + "name": "dex", + "constants": [ + { + "name": "NAME_LEN", + "type": "u64", + "value": "16" + }, + { + "name": "MAX_OUTRIGHTS", + "type": "u64", + "value": "128" + }, + { + "name": "MAX_PRODUCTS", + "type": "u64", + "value": "256" + }, + { + "name": "HEALTH_BUFFER_LEN", + "type": "u64", + "value": "32" + }, + { + "name": "MAX_TRADER_POSITIONS", + "type": "u64", + "value": "16" + }, + { + "name": "MAX_OPEN_ORDERS_PER_POSITION", + "type": "u64", + "value": "256" + }, + { + "name": "MAX_OPEN_ORDERS", + "type": "u64", + "value": "1024" + }, + { + "name": "ANCHOR_DISCRIMINANT_LEN", + "type": "u64", + "value": "8" + }, + { + "name": "SENTINEL", + "type": "u64", + "value": "0" + }, + { + "name": "CALLBACK_INFO_LEN", + "type": "u64", + "value": "std :: mem :: size_of :: < CallBackInfo > () as u64" + }, + { + "name": "CALLBACK_ID_LEN", + "type": "u64", + "value": "32" + }, + { + "name": "MAX_COMBOS", + "type": "u64", + "value": "128" + }, + { + "name": "MAX_LEGS", + "type": "u64", + "value": "4" + }, + { + "name": "SLOTS_1_MIN", + "type": "u64", + "value": "150" + }, + { + "name": "SLOTS_5_MIN", + "type": "u64", + "value": "750" + }, + { + "name": "SLOTS_15_MIN", + "type": "u64", + "value": "2250" + }, + { + "name": "SLOTS_60_MIN", + "type": "u64", + "value": "9000" + } + ], + "instructions": [ + { + "name": "initializeMarketProductGroup", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "vaultMint", + "isMut": false, + "isSigner": false + }, + { + "name": "feeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "sysvarRent", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": false, + "isSigner": false + }, + { + "name": "stakingFeeCollector", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializeMarketProductGroupParams" + } + } + ] + }, + { + "name": "updateMarketProductGroup", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": false, + "isSigner": false + }, + { + "name": "feeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "stakingFeeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "UpdateMarketProductGroupParams" + } + } + ] + }, + { + "name": "setAddressLookupTable", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "addressLookupTable", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "initializeMarketProduct", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializeMarketProductParams" + } + } + ] + }, + { + "name": "changeOrderbook", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "oldOrderbook", + "isMut": false, + "isSigner": false + }, + { + "name": "oldEventQueue", + "isMut": false, + "isSigner": false + }, + { + "name": "oldBids", + "isMut": false, + "isSigner": false + }, + { + "name": "oldAsks", + "isMut": false, + "isSigner": false + }, + { + "name": "newOrderbook", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "deactivateMarketProduct", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "removeMarketProduct", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "removeMarketProductGroup", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "lockCollateral", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "feeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskStateAcct", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LockCollateralParams" + } + } + ] + }, + { + "name": "unlockCollateral", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "feeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskStateAcct", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LockCollateralParams" + } + } + ] + }, + { + "name": "initializePrintTrade", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": false, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": false, + "isSigner": false + }, + { + "name": "operator", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "operatorOwner", + "isMut": false, + "isSigner": true + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializePrintTradeParams" + } + } + ] + }, + { + "name": "initializePrintTradeExecutionOutput", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "executionOutput", + "isMut": true, + "isSigner": true + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "signPrintTrade", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": true, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": true, + "isSigner": false + }, + { + "name": "operator", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "creatorTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "creatorTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SignPrintTradeParams" + } + } + ] + }, + { + "name": "executePrintTrade", + "accounts": [ + { + "name": "op", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": true, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": true, + "isSigner": false + }, + { + "name": "operator", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "creatorTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "creatorTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + }, + { + "name": "executionOutput", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "cancelPrintTrade", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": false, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": false, + "isSigner": false + }, + { + "name": "operator", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "closePrintTrade", + "accounts": [ + { + "name": "op", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": false, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": false, + "isSigner": false + }, + { + "name": "operator", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + }, + { + "name": "creatorWallet", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "initializeTraderRiskGroup", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": true + }, + { + "name": "traderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "closeTraderRiskGroup", + "accounts": [ + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "receiver", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "newOrder", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "traderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "referrerTrg", + "isMut": true, + "isSigner": false, + "docs": [ + "referrer_trg receives a programmatic percentage of taker fees", + "sdks route this back to the user's trg", + "frontends will want to route this to their own trg" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "NewOrderParams" + } + } + ] + }, + { + "name": "clearOpenOrders", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClearOpenOrdersParams" + } + } + ] + }, + { + "name": "reinitializeTraderPositions", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "setNumRiskStateAccounts", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetNumRiskStateAccountsParams" + } + } + ] + }, + { + "name": "updateVarianceCache", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "consumeOrderbookEvents", + "accounts": [ + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "rewardTarget", + "isMut": true, + "isSigner": true + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ConsumeOrderbookEventsParams" + } + } + ] + }, + { + "name": "cancelOrder", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "CancelOrderParams" + } + } + ] + }, + { + "name": "depositFunds", + "accounts": [ + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "user", + "isMut": false, + "isSigner": true + }, + { + "name": "userTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "capitalLimits", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "DepositFundsParams" + } + } + ] + }, + { + "name": "withdrawFunds", + "accounts": [ + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "user", + "isMut": false, + "isSigner": true + }, + { + "name": "userTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "capitalLimits", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "WithdrawFundsParams" + } + } + ] + }, + { + "name": "updateProductFunding", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "UpdateProductFundingParams" + } + } + ] + }, + { + "name": "updateProductMarkPriceConfig", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "UpdateProductMarkPriceConfigParams" + } + } + ] + }, + { + "name": "transferFullPosition", + "accounts": [ + { + "name": "liquidator", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidateeRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidatorRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidatorRiskStateAccountInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidateeRiskStateAccountInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "initializeCombo", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializeComboParams" + } + } + ] + }, + { + "name": "updateTraderFunding", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAccountInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "clearExpiredOrderbook", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClearExpiredOrderbookParams" + } + } + ] + }, + { + "name": "popEvents", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "PopEventsParams" + } + } + ] + }, + { + "name": "sweepFees", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "stakingFeeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "feeCollectorTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "stakingFeeCollectorTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "chooseSuccessor", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "claimAuthority", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "setupCapitalLimits", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "capitalLimitsState", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "updateCapitalLimits", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "capitalLimitsState", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "CapitalLimitsParams" + } + } + ] + }, + { + "name": "updateTraderRiskGroup", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderFeeStateAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "updateTraderRiskGroupOwner", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "newOwner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "disableKillswitch", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "enableKillswitch", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + } + ], + "accounts": [ + { + "name": "CapitalLimits", + "type": { + "kind": "struct", + "fields": [ + { + "name": "depositLimit", + "type": { + "defined": "Fractional" + } + }, + { + "name": "withdrawalLimit", + "type": { + "defined": "Fractional" + } + }, + { + "name": "marketProductGroup", + "type": "publicKey" + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "MarketProductGroup", + "docs": [ + "The highest level organizational unit of the Dex.", + "Market product groups exist independently of each other.", + "i.e. each trader, product etc, corresponds to exactly one market product group." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "authority", + "type": "publicKey" + }, + { + "name": "successor", + "type": "publicKey" + }, + { + "name": "vaultMint", + "type": "publicKey" + }, + { + "name": "collectedFees", + "type": { + "defined": "Fractional" + } + }, + { + "name": "feeCollector", + "type": "publicKey" + }, + { + "name": "decimals", + "type": "u64" + }, + { + "name": "riskEngineProgramId", + "type": "publicKey" + }, + { + "name": "feeModelProgramId", + "type": "publicKey" + }, + { + "name": "feeModelConfigurationAcct", + "type": "publicKey" + }, + { + "name": "riskModelConfigurationAcct", + "type": "publicKey" + }, + { + "name": "activeFlagsProducts", + "type": { + "defined": "Bitset" + } + }, + { + "name": "ewmaWindows", + "type": { + "array": [ + "u64", + 4 + ] + } + }, + { + "name": "marketProducts", + "type": { + "defined": "ProductArray" + } + }, + { + "name": "vaultBump", + "type": "u16" + }, + { + "name": "riskAndFeeBump", + "type": "u16" + }, + { + "name": "findFeesDiscriminantLen", + "type": "u16" + }, + { + "name": "validateAccountDiscriminantLen", + "type": "u16" + }, + { + "name": "findFeesDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "validateAccountHealthDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "validateAccountLiquidationDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "maxMakerFeeBps", + "type": "i16" + }, + { + "name": "minMakerFeeBps", + "type": "i16" + }, + { + "name": "maxTakerFeeBps", + "type": "i16" + }, + { + "name": "minTakerFeeBps", + "type": "i16" + }, + { + "name": "feeOutputRegister", + "type": "publicKey" + }, + { + "name": "riskOutputRegister", + "type": "publicKey" + }, + { + "name": "sequenceNumber", + "type": "u128" + }, + { + "name": "stakingFeeCollector", + "type": "publicKey" + }, + { + "name": "isKilled", + "type": "bool" + }, + { + "name": "createFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "addressLookupTable", + "type": "publicKey" + }, + { + "name": "closeRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + } + ] + } + }, + { + "name": "ProductArray", + "type": { + "kind": "struct", + "fields": [ + { + "name": "array", + "type": { + "array": [ + { + "defined": "Product" + }, + 256 + ] + } + } + ] + } + }, + { + "name": "PrintTradeProduct", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "size", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "PrintTrade", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isInitialized", + "type": "bool" + }, + { + "name": "creator", + "type": "publicKey" + }, + { + "name": "counterparty", + "type": "publicKey" + }, + { + "name": "seed", + "type": "publicKey" + }, + { + "name": "marketProductGroup", + "type": "publicKey" + }, + { + "name": "numProducts", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "PrintTradeProductIndex" + }, + 6 + ] + } + }, + { + "name": "price", + "type": { + "defined": "Fractional" + } + }, + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "operator", + "type": "publicKey" + }, + { + "name": "operatorCreatorFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "operatorCounterpartyFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "isSigned", + "type": "bool" + }, + { + "name": "isCancelled", + "type": { + "defined": "CancelStatus" + } + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "RiskOutputRegister", + "type": { + "kind": "struct", + "fields": [ + { + "name": "riskEngineOutput", + "type": { + "defined": "HealthResult" + } + } + ] + } + }, + { + "name": "TraderRiskGroup", + "docs": [ + "State account corresponding to a trader on a given market product group" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "marketProductGroup", + "type": "publicKey" + }, + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "activeProducts", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "totalDeposited", + "type": { + "defined": "Fractional" + } + }, + { + "name": "totalWithdrawn", + "type": { + "defined": "Fractional" + } + }, + { + "name": "cashBalance", + "type": { + "defined": "Fractional" + } + }, + { + "name": "pendingCashBalance", + "type": { + "defined": "Fractional" + } + }, + { + "name": "pendingFees", + "type": { + "defined": "Fractional" + } + }, + { + "name": "validUntil", + "type": "u64" + }, + { + "name": "makerFeeBps", + "type": "i32" + }, + { + "name": "takerFeeBps", + "type": "i32" + }, + { + "name": "traderPositions", + "type": { + "array": [ + { + "defined": "TraderPosition" + }, + 16 + ] + } + }, + { + "name": "riskStateAccount", + "type": "publicKey" + }, + { + "name": "feeStateAccount", + "type": "publicKey" + }, + { + "name": "clientOrderId", + "type": "u128" + }, + { + "name": "openOrders", + "type": { + "defined": "OpenOrders" + } + }, + { + "name": "lockedCollateral", + "type": { + "array": [ + { + "defined": "LockedCollateral" + }, + 16 + ] + } + }, + { + "name": "notionalMakerVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "notionalTakerVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "referredTakersNotionalVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "referralFees", + "docs": [ + "referral_fees is not necessarily REFERRER_FEES_PROPORTION * referred_takers_notional_volume,", + "because combo volume has only collects 1/8th the fees as outright volume" + ], + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "PrintTradeExecutionOutput", + "type": { + "kind": "struct", + "fields": [ + { + "name": "result", + "type": { + "defined": "PrintTradeExecutionResult" + } + } + ] + } + }, + { + "name": "CapitalLimitsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "depositLimit", + "type": { + "defined": "Fractional" + } + }, + { + "name": "withdrawalLimit", + "type": { + "defined": "Fractional" + } + } + ] + } + } + ], + "types": [ + { + "name": "LockedCollateralProductIndex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "size", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "PrintTradeProductIndex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "size", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "ProductArray", + "type": { + "kind": "struct", + "fields": [ + { + "name": "array", + "type": { + "array": [ + { + "defined": "Product" + }, + 256 + ] + } + } + ] + } + }, + { + "name": "Side", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Bid" + }, + { + "name": "Ask" + } + ] + } + }, + { + "name": "Params", + "type": { + "kind": "struct", + "fields": [ + { + "name": "quantity", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "CallBackInfo", + "docs": [ + "Buffer attached to aaob events to tie owner to events" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "userAccount", + "type": "publicKey" + }, + { + "name": "openOrdersIdx", + "type": "u64" + }, + { + "name": "orderNonce", + "type": "u128" + }, + { + "name": "clientOrderId", + "type": "u64" + } + ] + } + }, + { + "name": "TraderFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "validUntil", + "type": "i64" + }, + { + "name": "makerFeeBps", + "type": "i32" + }, + { + "name": "takerFeeBps", + "type": "i32" + } + ] + } + }, + { + "name": "TraderFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "isAggressor", + "type": "bool" + }, + { + "name": "matchedQuoteQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "matchedBaseQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "product", + "type": "publicKey" + } + ] + } + }, + { + "name": "PriceEwma", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ewmaBid", + "type": { + "array": [ + { + "defined": "Fractional" + }, + 4 + ] + } + }, + { + "name": "ewmaAsk", + "type": { + "array": [ + { + "defined": "Fractional" + }, + 4 + ] + } + }, + { + "name": "bid", + "type": { + "defined": "Fractional" + } + }, + { + "name": "ask", + "type": { + "defined": "Fractional" + } + }, + { + "name": "slot", + "type": "u64" + }, + { + "name": "prevBid", + "type": { + "defined": "Fractional" + } + }, + { + "name": "prevAsk", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "OpenOrdersMetadata", + "type": { + "kind": "struct", + "fields": [ + { + "name": "askQtyInBook", + "type": { + "defined": "Fractional" + } + }, + { + "name": "bidQtyInBook", + "type": { + "defined": "Fractional" + } + }, + { + "name": "headIndex", + "type": "u64" + }, + { + "name": "numOpenOrders", + "type": "u64" + } + ] + } + }, + { + "name": "OpenOrders", + "type": { + "kind": "struct", + "fields": [ + { + "name": "freeListHead", + "type": "u64" + }, + { + "name": "totalOpenOrders", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "OpenOrdersMetadata" + }, + 256 + ] + } + }, + { + "name": "orders", + "type": { + "array": [ + { + "defined": "OpenOrdersNode" + }, + 1024 + ] + } + } + ] + } + }, + { + "name": "OpenOrdersNode", + "type": { + "kind": "struct", + "fields": [ + { + "name": "id", + "type": "u128" + }, + { + "name": "qty", + "type": "u64" + }, + { + "name": "clientId", + "type": "u64" + }, + { + "name": "prev", + "type": "u64" + }, + { + "name": "next", + "type": "u64" + } + ] + } + }, + { + "name": "Outright", + "docs": [ + "A market product corresponding to one underlying asset" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "metadata", + "type": { + "defined": "ProductMetadata" + } + }, + { + "name": "numRiskStateAccounts", + "docs": [ + "num_risk_state_accounts is the number of risk state accounts that have an untidied entry related to this product.", + "The DEX assumes that the attached risk engine will tidy (this likely means \"remove\")", + "risk entries related to this product during the first risk check after removing a TraderPosition." + ], + "type": "u64" + }, + { + "name": "productStatus", + "type": { + "defined": "ProductStatus" + } + }, + { + "name": "dust", + "type": { + "defined": "Fractional" + } + }, + { + "name": "cumFundingPerShare", + "type": { + "defined": "Fractional" + } + }, + { + "name": "cumSocialLossPerShare", + "type": { + "defined": "Fractional" + } + }, + { + "name": "openLongInterest", + "type": { + "defined": "Fractional" + } + }, + { + "name": "openShortInterest", + "type": { + "defined": "Fractional" + } + }, + { + "name": "markPriceQualifyingCumValue", + "type": { + "defined": "Fractional" + } + }, + { + "name": "markPriceMaxQualifyingWidth", + "type": { + "defined": "Fractional" + } + }, + { + "name": "padding", + "type": { + "array": [ + "u64", + 10 + ] + } + } + ] + } + }, + { + "name": "ProductMetadata", + "docs": [ + "Shared fields between Outright and Combo products" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u64" + }, + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "orderbook", + "type": "publicKey" + }, + { + "name": "tickSize", + "type": { + "defined": "Fractional" + } + }, + { + "name": "baseDecimals", + "type": "u64" + }, + { + "name": "priceOffset", + "type": { + "defined": "Fractional" + } + }, + { + "name": "notionalTradedVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "prices", + "type": { + "defined": "PriceEwma" + } + } + ] + } + }, + { + "name": "Combo", + "docs": [ + "A market product with multiple legs that are each outrights" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "metadata", + "type": { + "defined": "ProductMetadata" + } + }, + { + "name": "numLegs", + "type": "u64" + }, + { + "name": "legsArray", + "type": { + "array": [ + { + "defined": "Leg" + }, + 4 + ] + } + } + ] + } + }, + { + "name": "Leg", + "docs": [ + "One part of a combo. Each leg corresponds to an outright with the ratio determining", + "relative weighting" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "ratio", + "type": "i64" + } + ] + } + }, + { + "name": "HealthInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "health", + "type": { + "defined": "HealthStatus" + } + }, + { + "name": "action", + "type": { + "defined": "ActionStatus" + } + } + ] + } + }, + { + "name": "LiquidationInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "health", + "type": { + "defined": "HealthStatus" + } + }, + { + "name": "action", + "type": { + "defined": "ActionStatus" + } + }, + { + "name": "totalSocialLoss", + "type": { + "defined": "Fractional" + } + }, + { + "name": "liquidationPrice", + "type": { + "defined": "Fractional" + } + }, + { + "name": "socialLosses", + "type": { + "array": [ + { + "defined": "SocialLoss" + }, + 16 + ] + } + } + ] + } + }, + { + "name": "SocialLoss", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "amount", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "OrderInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "totalOrderQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "matchedOrderQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "orderSide", + "type": { + "defined": "Side" + } + }, + { + "name": "orderPrice", + "type": { + "defined": "Fractional" + } + }, + { + "name": "isCombo", + "type": "bool" + }, + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "operationType", + "type": { + "defined": "OperationType" + } + }, + { + "name": "oldAskQtyInBook", + "type": { + "defined": "Fractional" + } + }, + { + "name": "oldBidQtyInBook", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "TraderPosition", + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "position", + "type": { + "defined": "Fractional" + } + }, + { + "name": "pendingPosition", + "type": { + "defined": "Fractional" + } + }, + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "lastCumFundingSnapshot", + "type": { + "defined": "Fractional" + } + }, + { + "name": "lastSocialLossSnapshot", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "LockedCollateral", + "docs": [ + "there is one LockedCollateral for each product; the array is in one-to-one mapping with trader_positions" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "askQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "bidQty", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "Bitset", + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": { + "array": [ + "u128", + 2 + ] + } + } + ] + } + }, + { + "name": "Fractional", + "docs": [ + "Fractional Operations" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "m", + "type": "i64" + }, + { + "name": "exp", + "type": "u64" + } + ] + } + }, + { + "name": "InitializeMarketProductGroupParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "validateAccountDiscriminantLen", + "type": "u64" + }, + { + "name": "findFeesDiscriminantLen", + "type": "u64" + }, + { + "name": "validateAccountHealthDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "validateAccountLiquidationDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "findFeesDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "maxMakerFeeBps", + "type": "i16" + }, + { + "name": "minMakerFeeBps", + "type": "i16" + }, + { + "name": "maxTakerFeeBps", + "type": "i16" + }, + { + "name": "minTakerFeeBps", + "type": "i16" + } + ] + } + }, + { + "name": "UpdateMarketProductGroupParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "findFeesDiscriminantLen", + "type": "u16" + }, + { + "name": "findFeesDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + } + ] + } + }, + { + "name": "InitializePrintTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numProducts", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "PrintTradeProductIndex" + }, + 6 + ] + } + }, + { + "name": "price", + "type": { + "defined": "Fractional" + } + }, + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "operatorCreatorFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "operatorCounterpartyFeeProportion", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "LockCollateralParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numProducts", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "LockedCollateralProductIndex" + }, + 6 + ] + } + } + ] + } + }, + { + "name": "SignPrintTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numProducts", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "PrintTradeProductIndex" + }, + 6 + ] + } + }, + { + "name": "price", + "type": { + "defined": "Fractional" + } + }, + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "operatorCreatorFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "operatorCounterpartyFeeProportion", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "InitializeMarketProductParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "tickSize", + "type": { + "defined": "Fractional" + } + }, + { + "name": "baseDecimals", + "type": "u64" + }, + { + "name": "priceOffset", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "NewOrderParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "side", + "docs": [ + "The order's side (Bid or Ask)" + ], + "type": { + "defined": "Side" + } + }, + { + "name": "maxBaseQty", + "docs": [ + "The max quantity of base token to match and post" + ], + "type": { + "defined": "Fractional" + } + }, + { + "name": "orderType", + "docs": [ + "The order type (supported types include Limit, FOK, IOC and PostOnly)" + ], + "type": { + "defined": "OrderType" + } + }, + { + "name": "matchLimit", + "docs": [ + "The maximum number of orders to be matched against.", + "Setting this number too high can sometimes lead to excessive resource consumption which can cause a failure." + ], + "type": "u64" + }, + { + "name": "limitPrice", + "docs": [ + "The order's limit price in ticks" + ], + "type": { + "defined": "Fractional" + } + }, + { + "name": "referrerFeeBps", + "docs": [ + "In addition to taker fees; routed to referrer_trg; can be zero", + "Should be used like this: 3bps -> use the value Fractional{ m: 3, exp: 4 }", + "Min: 0; Max: 100bps." + ], + "type": { + "defined": "Fractional" + } + }, + { + "name": "clientOrderId", + "docs": [ + "Order id that can be specified by client. Can be arbitrary u64. Defaults to the value 0." + ], + "type": "u64" + } + ] + } + }, + { + "name": "ClearOpenOrdersParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + } + ] + } + }, + { + "name": "SetNumRiskStateAccountsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numRiskStateAccounts", + "type": "u64" + } + ] + } + }, + { + "name": "ConsumeOrderbookEventsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxIterations", + "docs": [ + "The maximum number of events to consume" + ], + "type": "u64" + } + ] + } + }, + { + "name": "CancelOrderParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderId", + "docs": [ + "The order_id of the order to cancel. Redundancy is used here to avoid having to iterate over all", + "open orders on chain. If order_id == 0, then client_order_id is used." + ], + "type": "u128" + }, + { + "name": "noErr", + "docs": [ + "do not fail when order is not found" + ], + "type": "bool" + }, + { + "name": "clientOrderId", + "docs": [ + "The client_order_id of the order to cancel. Used when order_id == 0." + ], + "type": "u64" + } + ] + } + }, + { + "name": "DepositFundsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "quantity", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "WithdrawFundsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "quantity", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "UpdateProductFundingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": { + "defined": "Fractional" + } + }, + { + "name": "newProductStatus", + "type": { + "defined": "ProductStatus" + } + } + ] + } + }, + { + "name": "UpdateProductMarkPriceConfigParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "markPriceQualifyingCumValue", + "type": { + "defined": "Fractional" + } + }, + { + "name": "markPriceMaxQualifyingWidth", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "InitializeComboParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "tickSize", + "type": { + "defined": "Fractional" + } + }, + { + "name": "priceOffset", + "type": { + "defined": "Fractional" + } + }, + { + "name": "baseDecimals", + "type": "u64" + }, + { + "name": "ratios", + "type": { + "vec": "i8" + } + } + ] + } + }, + { + "name": "PopEventsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numEventsToPop", + "type": "u64" + } + ] + } + }, + { + "name": "ClearExpiredOrderbookParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numOrdersToCancel", + "type": "u8" + } + ] + } + }, + { + "name": "DomainOrProgramError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "DexErr", + "fields": [ + { + "defined": "DexError" + } + ] + }, + { + "name": "UtilErr", + "fields": [ + { + "defined": "UtilError" + } + ] + }, + { + "name": "ProgramErr", + "fields": [ + { + "name": "msg", + "type": "string" + } + ] + }, + { + "name": "Other", + "fields": [ + { + "name": "code", + "type": "u32" + }, + { + "name": "msg", + "type": "string" + } + ] + } + ] + } + }, + { + "name": "UtilError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "AccountAlreadyInitialized" + }, + { + "name": "AccountUninitialized" + }, + { + "name": "DuplicateProductKey" + }, + { + "name": "PublicKeyMismatch" + }, + { + "name": "AssertionError" + }, + { + "name": "InvalidMintAuthority" + }, + { + "name": "IncorrectOwner" + }, + { + "name": "PublicKeysShouldBeUnique" + }, + { + "name": "NotRentExempt" + }, + { + "name": "NumericalOverflow" + }, + { + "name": "RoundError" + }, + { + "name": "DivisionbyZero" + }, + { + "name": "InvalidReturnValue" + }, + { + "name": "SqrtRootError" + }, + { + "name": "ZeroPriceError" + }, + { + "name": "ZeroQuantityError" + }, + { + "name": "SerializeError" + }, + { + "name": "DeserializeError" + }, + { + "name": "InvalidBitsetIndex" + }, + { + "name": "PushToFullBitvec" + }, + { + "name": "U8MaxNotAllowedInBitvec" + } + ] + } + }, + { + "name": "DexError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "ContractIsExpired" + }, + { + "name": "ContractIsNotExpired" + }, + { + "name": "InvalidSystemProgramAccount" + }, + { + "name": "InvalidAobProgramAccount" + }, + { + "name": "InvalidStateAccountOwner" + }, + { + "name": "InvalidOrderIndex" + }, + { + "name": "UserAccountFull" + }, + { + "name": "TransactionAborted" + }, + { + "name": "MissingUserAccount" + }, + { + "name": "OrderNotFound" + }, + { + "name": "NoOp" + }, + { + "name": "OutofFunds" + }, + { + "name": "UserAccountStillActive" + }, + { + "name": "MarketStillActive" + }, + { + "name": "InvalidMarketSignerAccount" + }, + { + "name": "InvalidOrderbookAccount" + }, + { + "name": "InvalidMarketAdminAccount" + }, + { + "name": "InvalidBaseVaultAccount" + }, + { + "name": "InvalidQuoteVaultAccount" + }, + { + "name": "FullMarketProductGroup" + }, + { + "name": "MissingMarketProduct" + }, + { + "name": "InvalidWithdrawalAmount" + }, + { + "name": "InvalidTakerTrader" + }, + { + "name": "FundsError" + }, + { + "name": "InactiveProductError" + }, + { + "name": "TooManyOpenOrdersError" + }, + { + "name": "NoMoreOpenOrdersError" + }, + { + "name": "NonZeroPriceTickExponentError" + }, + { + "name": "DuplicateProductNameError" + }, + { + "name": "InvalidRiskResponseError" + }, + { + "name": "InvalidAccountHealthError" + }, + { + "name": "OrderbookIsEmptyError" + }, + { + "name": "CombosNotRemoved" + }, + { + "name": "AccountNotLiquidable" + }, + { + "name": "FundingPrecisionError" + }, + { + "name": "ProductDecimalPrecisionError" + }, + { + "name": "ProductNotOutright" + }, + { + "name": "ProductNotCombo" + }, + { + "name": "InvalidSocialLossCalculation" + }, + { + "name": "ProductIndexMismatch" + }, + { + "name": "InvalidOrderID" + }, + { + "name": "InvalidBytesForZeroCopyDeserialization" + }, + { + "name": "IncorrectPrintTradeSize" + }, + { + "name": "IncorrectPrintTradePrice" + }, + { + "name": "IncorrectPrintTradeSide" + }, + { + "name": "IncorrectPrintTradeOperatorCreatorFees" + }, + { + "name": "IncorrectPrintTradeOperatorCounterpartyFees" + }, + { + "name": "InvalidPrintTradeOperatorFees" + }, + { + "name": "DepositLimitExceeded" + }, + { + "name": "WithdrawLimitExceeded" + }, + { + "name": "NegativeDepositLimit" + }, + { + "name": "NegativeWithdrawLimit" + }, + { + "name": "DepositDeniedInsufficientBalanceOnWhitelistAtaToken" + }, + { + "name": "DepositDeclinedUnfrozenWhitelistAtaToken" + }, + { + "name": "DepositDeclinedNonExistentWhitelistAtaTokenOnTraderRiskGroup" + }, + { + "name": "InvalidProductStatusInUpdateFunding" + }, + { + "name": "ContractIsNotExpiring" + }, + { + "name": "ContractHasNonZeroOpenInterest" + }, + { + "name": "ContractHasNonZeroOpenInterestOrRiskStateAccounts" + }, + { + "name": "ContractIsActive" + }, + { + "name": "FailedToGetOrderQuantity" + }, + { + "name": "SelfTradeBehaviorDecrementTakeIsDisallowed" + }, + { + "name": "PriceBandViolation" + }, + { + "name": "UnexpectedImbalancedOpenInterest" + }, + { + "name": "MaximumOpenInterestExceeded" + }, + { + "name": "MarketProductGroupKillswitchIsOn" + }, + { + "name": "InvalidFutureExpiry" + }, + { + "name": "MaxReferrerFeeBpsExceeded" + }, + { + "name": "PrintTradeOperatorDidNotSign" + }, + { + "name": "PrintTradeInvalidProductsLength" + }, + { + "name": "ContractIsNotActive" + }, + { + "name": "PrintTradeInvalidNumProducts" + }, + { + "name": "PrintTradeProductMismatch" + }, + { + "name": "InsufficientLockedCollateral" + }, + { + "name": "OracleNotWhitelisted" + } + ] + } + }, + { + "name": "AccountTag", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Uninitialized" + }, + { + "name": "MarketProductGroup" + }, + { + "name": "TraderRiskGroup" + }, + { + "name": "TraderPosition" + }, + { + "name": "MarketProductGroupWithCombos" + }, + { + "name": "ComboGroup" + }, + { + "name": "Combo" + }, + { + "name": "RiskProfile" + }, + { + "name": "LockedCollateral" + } + ] + } + }, + { + "name": "ProductStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Uninitialized" + }, + { + "name": "Initialized" + }, + { + "name": "Expired" + }, + { + "name": "Expiring" + } + ] + } + }, + { + "name": "OrderType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Limit" + }, + { + "name": "ImmediateOrCancel" + }, + { + "name": "FillOrKill" + }, + { + "name": "PostOnly" + } + ] + } + }, + { + "name": "CancelStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Active" + }, + { + "name": "CreatorCancelled" + }, + { + "name": "CounterpartyCancelled" + } + ] + } + }, + { + "name": "Product", + "docs": [ + "Unify Outright and Combo" + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "Outright", + "fields": [ + { + "name": "outright", + "type": { + "defined": "Outright" + } + } + ] + }, + { + "name": "Combo", + "fields": [ + { + "name": "combo", + "type": { + "defined": "Combo" + } + } + ] + } + ] + } + }, + { + "name": "OperationType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NewOrder" + }, + { + "name": "CancelOrder" + }, + { + "name": "CheckHealth" + }, + { + "name": "PositionTransfer" + }, + { + "name": "ConsumeEvents" + }, + { + "name": "CheckWithdrawalHealth" + }, + { + "name": "LockCollateral" + }, + { + "name": "SignPrinTrade" + } + ] + } + }, + { + "name": "HealthResult", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Health", + "fields": [ + { + "name": "health_info", + "type": { + "defined": "HealthInfo" + } + } + ] + }, + { + "name": "Liquidation", + "fields": [ + { + "name": "liquidation_info", + "type": { + "defined": "LiquidationInfo" + } + } + ] + } + ] + } + }, + { + "name": "HealthStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Healthy" + }, + { + "name": "Unhealthy" + }, + { + "name": "Liquidatable" + }, + { + "name": "NotLiquidatable" + } + ] + } + }, + { + "name": "ActionStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Approved" + }, + { + "name": "NotApproved" + } + ] + } + }, + { + "name": "PrintTradeExecutionResult", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CounterpartyHasntSigned" + }, + { + "name": "CreatorCancelled" + }, + { + "name": "CounterpartyCancelled" + }, + { + "name": "CreatorNotEnoughLockedCollateral" + }, + { + "name": "CounterpartyNotEnoughLockedCollateral" + }, + { + "name": "Success" + } + ] + } + } + ], + "events": [ + { + "name": "DexOrderSummary", + "fields": [ + { + "name": "postedOrderId", + "type": { + "option": "u128" + }, + "index": false + }, + { + "name": "totalBaseQty", + "type": "u64", + "index": false + }, + { + "name": "totalQuoteQty", + "type": "u64", + "index": false + }, + { + "name": "totalBaseQtyPosted", + "type": "u64", + "index": false + } + ] + } + ] +} \ No newline at end of file diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/gpa.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/gpa.ts new file mode 100644 index 000000000..4b9b9cb0b --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/gpa.ts @@ -0,0 +1,28 @@ +import { PublicKey } from '@solana/web3.js'; +import { + PROGRAM_ID, + lockedCollateralRecordDiscriminator, +} from '@convergence-rfq/hxro-print-trade-provider'; + +import { Convergence } from '../../Convergence'; +import { GpaBuilder } from '../../utils'; + +const USER = 8; +const RESPONSE = USER + 32; +const TRG = RESPONSE + 32; +const IS_IN_USE = TRG + 32; + +export class LockCollateralRecordGpaBuilder extends GpaBuilder { + constructor(convergence: Convergence, programId?: PublicKey) { + super(convergence, programId ?? PROGRAM_ID); + this.where(0, Buffer.from(lockedCollateralRecordDiscriminator)); + } + + whereUser(user: PublicKey) { + return this.where(USER, user); + } + + whereInUse(isInUse: boolean) { + return this.where(IS_IN_USE, isInUse ? 1 : 0); + } +} diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/helpers.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/helpers.ts new file mode 100644 index 000000000..1325dbf20 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/helpers.ts @@ -0,0 +1,36 @@ +import BigNumber from 'bignumber.js'; +import BN from 'bn.js'; +import { HXRO_LEG_DECIMALS } from './constants'; +import { Convergence } from '@/Convergence'; +import { PublicKey } from '@/types'; + +export const fetchValidHxroMpg = async (cvg: Convergence, manifest: any) => { + const { validMpg } = await cvg.hxro().fetchConfig(); + + const mpg = await manifest.getMPG(validMpg); + return { pubkey: validMpg, ...mpg }; +}; + +export const numberToHxroFractional = (value: number, negate?: boolean) => { + let withDecimals = new BigNumber(value).times( + new BigNumber(10).pow(HXRO_LEG_DECIMALS) + ); + + if (negate) { + withDecimals = withDecimals.negated(); + } + + return { m: new BN(withDecimals.toString()), exp: new BN(HXRO_LEG_DECIMALS) }; +}; + +export const getFirstHxroExecutionOutput = async ( + cvg: Convergence, + dexProgramId: PublicKey +) => { + const [{ pubkey }] = await cvg.connection.getProgramAccounts(dexProgramId, { + dataSlice: { length: 1, offset: 0 }, + filters: [{ memcmp: { offset: 0, bytes: 'EdEf3SczfYR' } }], + }); + + return pubkey; +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/index.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/index.ts new file mode 100644 index 000000000..10622f2d4 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/index.ts @@ -0,0 +1,9 @@ +export * from './printTrade'; +export * from './constants'; +export * from './accounts'; +export * from './pdas'; +export * from './plugin'; +export * from './program'; +export * from './operations'; +export * from './models'; +export * from './types'; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/models/Config.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/models/Config.ts new file mode 100644 index 000000000..8ca823088 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/models/Config.ts @@ -0,0 +1,21 @@ +import { PublicKey } from '@solana/web3.js'; + +import { HxroPrintTradeProviderConfigAccount } from '../accounts'; + +export type HxroPrintTradeProviderConfig = { + /** A model identifier to distinguish models in the SDK. */ + readonly model: 'hxroPrintTradeProviderConfig'; + + readonly address: PublicKey; + + readonly validMpg: PublicKey; +}; + +/** @group Model Helpers */ +export const toHxroPrintTradeProviderConfig = ( + account: HxroPrintTradeProviderConfigAccount +): HxroPrintTradeProviderConfig => ({ + model: 'hxroPrintTradeProviderConfig', + address: account.publicKey, + validMpg: account.data.validMpg, +}); diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/models/index.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/models/index.ts new file mode 100644 index 000000000..bd37f302d --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/models/index.ts @@ -0,0 +1 @@ +export * from './Config'; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchHxroPrintTradeProviderConfig.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchHxroPrintTradeProviderConfig.ts new file mode 100644 index 000000000..d4dabf282 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchHxroPrintTradeProviderConfig.ts @@ -0,0 +1,58 @@ +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { Convergence } from '../../../Convergence'; +import { HxroPrintTradeProviderConfig } from '../models'; +import { configCache } from '../cache'; + +const Key = 'FetchHxroPrintTradeProviderConfig' as const; + +export const fetchHxroPrintTradeProviderConfigOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type FetchHxroPrintTradeProviderConfigOperation = Operation< + typeof Key, + FetchHxroPrintTradeProviderConfigInput, + FetchHxroPrintTradeProviderConfigOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type FetchHxroPrintTradeProviderConfigInput = {} | undefined; + +/** + * @group Operations + * @category Outputs + */ +export type FetchHxroPrintTradeProviderConfigOutput = + HxroPrintTradeProviderConfig; + +/** + * @group Operations + * @category Handlers + */ +export const fetchHxroPrintTradeProviderConfigOperationHandler: OperationHandler = + { + handle: async ( + _operation: FetchHxroPrintTradeProviderConfigOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const { commitment } = scope; + + const config = await configCache.get(cvg, commitment); + + scope.throwIfCanceled(); + + return config; + }, + }; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchHxroProducts.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchHxroProducts.ts new file mode 100644 index 000000000..650bc5c67 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchHxroProducts.ts @@ -0,0 +1,199 @@ +import dexterity from '@hxronetwork/dexterity-ts'; +import BN from 'bn.js'; +import { OptionType } from '@convergence-rfq/risk-engine'; +import { HxroProductInfo } from '../types'; +import { fetchValidHxroMpg } from '../helpers'; +import { hxroManifestCache } from '../cache'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + PublicKey, + useOperation, +} from '@/types'; +import { BaseAsset } from '@/plugins/protocolModule'; + +const Key = 'FetchHxroProducts' as const; + +export const fetchHxroProductsOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type FetchHxroProductsOperation = Operation< + typeof Key, + FetchHxroProductsInput, + FetchHxroProductsOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type FetchHxroProductsInput = {} | undefined; + +/** + * @group Operations + * @category Outputs + */ +export type FetchHxroProductsOutput = HxroProductInfo[]; + +type BaseProductData = { + productIndex: number; + productName: string; + productAddress: PublicKey; +}; + +/** + * @group Operations + * @category Handlers + */ +export const fetchHxroProductsOperationHandler: OperationHandler = + { + handle: async ( + _operation: FetchHxroProductsOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const manifest = await hxroManifestCache.get(cvg); + const baseProductData = await parseBaseProductData(cvg, manifest); + scope.throwIfCanceled(); + + const baseAssets = await cvg.protocol().getBaseAssets(); + const productsData = await Promise.all( + baseProductData.map((baseData) => + expandProductData(manifest, baseAssets, baseData) + ) + ); + + scope.throwIfCanceled(); + + return productsData.filter((x): x is HxroProductInfo => x !== null); + }, + }; + +const parseBaseProductData = async ( + cvg: Convergence, + manifest: any +): Promise => { + const mpg = await fetchValidHxroMpg(cvg, manifest); + + return [...dexterity.Manifest.GetProductsOfMPG(mpg).values()] + .filter((productInfo) => productInfo.product?.outright !== undefined) + .map((productInfo) => { + const byteName: number[] = + productInfo.product.outright.outright.metadata.name; + const name = byteName.map((char) => String.fromCharCode(char)).join(''); + return { + productIndex: productInfo.index as number, + productName: name, + productAddress: productInfo.product.outright.outright.metadata + .productKey as PublicKey, + }; + }); +}; + +const expandProductData = async ( + manifest: any, + baseAssets: BaseAsset[], + baseData: BaseProductData +): Promise => { + const metadata = await manifest.getDerivativeMetadata( + baseData.productAddress + ); + const { + instrumentType: rawInstrumentType, + strike, + initializationTime, + fullFundingPeriod, + oracleType, + priceOracle, + } = metadata; + const strikePriceIsZero = strike.m.eq(new BN(0)); + const instrumentType = parseHxroInstrumentType(rawInstrumentType); + + const baseAsset = baseAssets.find( + (baseAsset) => + baseAsset.enabled && + baseAsset.pythOracle !== undefined && + oracleType.pyth !== undefined && + baseAsset.pythOracle.equals(priceOracle) + ); + + if (baseAsset === undefined) { + return null; + } + + const commonInResponse = { + ...baseData, + baseAssetIndex: baseAsset.index, + }; + + const isOption = + !strikePriceIsZero && + (instrumentType === 'expiring-call' || instrumentType === 'expiring-put'); + const isTermFuture = strikePriceIsZero && instrumentType === 'expiring-call'; + const isPerpFuture = instrumentType === 'recurring-call'; + const expirationTimestamp = + isOption || isTermFuture + ? initializationTime.add(fullFundingPeriod) + : undefined; + + // filter out expired products + if (expirationTimestamp !== undefined) { + const currentTimestamp = Date.now() / 1000; // convert to seconds + + if (expirationTimestamp <= currentTimestamp) { + return null; + } + } + + if (isOption) { + return { + ...commonInResponse, + instrumentType: 'option', + optionType: + instrumentType === 'expiring-call' ? OptionType.Call : OptionType.Put, + strikePrice: strike, + expirationTimestamp, + }; + } + if (isTermFuture) { + return { + ...commonInResponse, + instrumentType: 'term-future', + expirationTimestamp, + }; + } + if (isPerpFuture) { + return { + ...commonInResponse, + instrumentType: 'perp-future', + }; + } + + return null; +}; + +const parseHxroInstrumentType = (instrumentType: any) => { + if (instrumentType.expiringCall !== undefined) { + return 'expiring-call'; + } + + if (instrumentType.expiringPut !== undefined) { + return 'expiring-put'; + } + + if (instrumentType.recurringCall !== undefined) { + return 'recurring-call'; + } + + if (instrumentType.recurringPut !== undefined) { + return 'recurring-put'; + } + + throw new Error('Unrecognized Hxro instrument type!'); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchUnusedCollateralLockRecords.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchUnusedCollateralLockRecords.ts new file mode 100644 index 000000000..09a974503 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/fetchUnusedCollateralLockRecords.ts @@ -0,0 +1,74 @@ +import { + LockedCollateralRecord, + LockedCollateralRecordArgs, +} from '@convergence-rfq/hxro-print-trade-provider'; + +import { LockCollateralRecordGpaBuilder } from '../gpa'; +import { WithPubkey } from '../types'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '@/types'; + +const Key = 'fetchUnusedCollateralLockRecords' as const; + +export const fetchUnusedCollateralLockRecordsOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type FetchUnusedCollateralLockRecordsOperation = Operation< + typeof Key, + FetchUnusedCollateralLockRecordsInput, + FetchUnusedCollateralLockRecordsOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type FetchUnusedCollateralLockRecordsInput = {} | undefined; + +/** + * @group Operations + * @category Outputs + */ +export type FetchUnusedCollateralLockRecordsOutput = + WithPubkey[]; + +/** + * @group Operations + * @category Handlers + */ +export const fetchUnusedCollateralLockRecordsOperationHandler: OperationHandler = + { + handle: async ( + _operation: FetchUnusedCollateralLockRecordsOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const { programs } = scope; + const hxroPrintTradeProviderProgram = cvg + .programs() + .getHxroPrintTradeProvider(programs); + const gpaBuilder = new LockCollateralRecordGpaBuilder( + cvg, + hxroPrintTradeProviderProgram.address + ); + + const unparsedAccounts = await gpaBuilder + .whereUser(cvg.identity().publicKey) + .whereInUse(false) + .get(); + + return unparsedAccounts.map((acc) => ({ + ...LockedCollateralRecord.deserialize(acc.data)[0], + publicKey: acc.publicKey, + })); + }, + }; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/getHxroCollateralForSettlement.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/getHxroCollateralForSettlement.ts new file mode 100644 index 000000000..20232ca5b --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/getHxroCollateralForSettlement.ts @@ -0,0 +1,138 @@ +import { VersionedTransaction, TransactionMessage } from '@solana/web3.js'; + +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { lockHxroCollateralBuilder } from './lockHxroCollateral'; +import { + PrintTradeResponse, + PrintTradeRfq, + getAuthoritySide, +} from '@/plugins/rfqModule'; +import { HXRO_COLLATERAL_LOG_INDEX } from '@/constants'; + +const Key = 'GetRequiredHxroCollateralForSettlementOperation' as const; + +/** + * @group Operations + * @category Constructors + */ +export const getRequiredHxroCollateralForSettlementOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type GetRequiredHxroCollateralForSettlementOperation = Operation< + typeof Key, + GetRequiredHxroCollateralForSettlementInput, + GetRequiredHxroCollateralForSettlementOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type GetRequiredHxroCollateralForSettlementInput = { + /** Rfq Account. */ + rfq: PrintTradeRfq; + /** The response to prepare settlement for. */ + response: PrintTradeResponse; +}; + +/** + * @group Operations + * @category Outputs + */ +export type GetRequiredHxroCollateralForSettlementOutput = { + remainingCollateral: number; +}; + +/** + * @group Operations + * @category Handlers + */ +export const getRequiredHxroCollateralForSettlementOperationHandler: OperationHandler = + { + handle: async ( + operation: GetRequiredHxroCollateralForSettlementOperation, + convergence: Convergence, + scope: OperationScope + ): Promise => { + const payer = convergence.identity().publicKey; + const { rfq: rfqModel, response: responseModel } = operation.input; + const { printTrade } = operation.input.rfq; + + const caller = convergence.identity(); + const side = getAuthoritySide(caller.publicKey, rfqModel, responseModel); + if (!side) { + throw new Error('caller is not authorized to prepare settlement'); + } + const hxroContext = await printTrade.getHxroContextHelper( + convergence, + operation.input.response, + side + ); + const txBuilder = await lockHxroCollateralBuilder( + convergence, + { + hxroContext, + rfq: operation.input.rfq, + response: operation.input.response, + side, + }, + scope + ); + + const remainingCollateral = 0; + + const lastValidBlockHeight = await convergence.rpc().getLatestBlockhash(); + const ixs = txBuilder.getInstructions(); + const txMessage = new TransactionMessage({ + payerKey: payer, + recentBlockhash: lastValidBlockHeight.blockhash, + instructions: ixs, + }).compileToV0Message(); + + const tx = new VersionedTransaction(txMessage); + const simulateTxResult = await convergence.connection.simulateTransaction( + tx, + { + sigVerify: false, + } + ); + + if (simulateTxResult.value.err) { + const { logs } = simulateTxResult.value; + if (!logs) { + return { remainingCollateral: 0 }; + } + const logToParse = logs[HXRO_COLLATERAL_LOG_INDEX]; + const logsSplit = logToParse.split(','); + let totalVariance = Number(logsSplit[0].split(':')[2]); + let openOrdersVariance = Number(logsSplit[1].split(':')[1]); + let positionalValue = Number(logsSplit[2].split(':')[1]); + + if (totalVariance < 0 || isNaN(totalVariance)) { + totalVariance = 0; + } + if (openOrdersVariance < 0 || isNaN(openOrdersVariance)) { + openOrdersVariance = 0; + } + if (positionalValue < 0 || isNaN(positionalValue)) { + positionalValue = 0; + } + + const remainingCollateralReq = + (Math.sqrt(positionalValue) + Math.sqrt(openOrdersVariance)) * 1.5; + return { remainingCollateral: remainingCollateralReq }; + } + scope.throwIfCanceled(); + return { remainingCollateral }; + }, + }; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/index.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/index.ts new file mode 100644 index 000000000..428334296 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/index.ts @@ -0,0 +1,10 @@ +export * from './fetchHxroPrintTradeProviderConfig'; +export * from './fetchHxroProducts'; +export * from './initializeHxroConfig'; +export * from './modifyHxroConfig'; +export * from './initializeOperatorPrintTradeProvider'; +export * from './lockHxroCollateral'; +export * from './signHxroPrintTrade'; +export * from './fetchUnusedCollateralLockRecords'; +export * from './unlockHxroCollateralByRecord'; +export * from './getHxroCollateralForSettlement'; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/initializeHxroConfig.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/initializeHxroConfig.ts new file mode 100644 index 000000000..387036489 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/initializeHxroConfig.ts @@ -0,0 +1,107 @@ +import { createInitializeConfigInstruction } from '@convergence-rfq/hxro-print-trade-provider'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + PublicKey, + makeConfirmOptionsFinalizedOnMainnet, + useOperation, +} from '@/types'; +import { SendAndConfirmTransactionResponse } from '@/plugins'; +import { TransactionBuilder, TransactionBuilderOptions } from '@/utils'; + +const Key = 'InitializeHxroConfig' as const; + +export const initializeHxroConfigOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type InitializeHxroConfigOperation = Operation< + typeof Key, + InitializeHxroConfigInput, + InitializeHxroConfigOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type InitializeHxroConfigInput = { + validMpg: PublicKey; + + authority?: PublicKey; +}; + +/** + * @group Operations + * @category Outputs + */ +export type InitializeHxroConfigOutput = SendAndConfirmTransactionResponse; + +/** + * @group Operations + * @category Handlers + */ +export const initializeHxroConfigOperationHandler: OperationHandler = + { + handle: async ( + operation: InitializeHxroConfigOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const builder = await initializeHxroConfigBuilder( + cvg, + operation.input, + scope + ); + scope.throwIfCanceled(); + + const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( + cvg, + scope.confirmOptions + ); + const output = await builder.sendAndConfirm(cvg, confirmOptions); + scope.throwIfCanceled(); + return output.response; + }, + }; + +export const initializeHxroConfigBuilder = async ( + cvg: Convergence, + params: InitializeHxroConfigInput, + options: TransactionBuilderOptions = {} +): Promise> => { + const { authority = cvg.identity().publicKey, validMpg } = params; + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + + const hxroPrintTradeProviderProgram = cvg + .programs() + .getHxroPrintTradeProvider(); + const systemProgram = cvg.programs().getSystem(programs); + + const protocol = cvg.protocol().pdas().protocol(); + const config = cvg.hxro().pdas().config(); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction: createInitializeConfigInstruction( + { + protocol, + authority, + config, + systemProgram: systemProgram.address, + }, + { + validMpg, + }, + hxroPrintTradeProviderProgram.address + ), + signers: [payer], + key: 'initializeHxroConfig', + }); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/initializeOperatorPrintTradeProvider.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/initializeOperatorPrintTradeProvider.ts new file mode 100644 index 000000000..ef927cce1 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/initializeOperatorPrintTradeProvider.ts @@ -0,0 +1,165 @@ +import { createInitializeOperatorTraderRiskGroupInstruction } from '@convergence-rfq/hxro-print-trade-provider'; +import { Keypair, PublicKey, SystemProgram } from '@solana/web3.js'; +import dexterity from '@hxronetwork/dexterity-ts'; +import { fetchValidHxroMpg } from '../helpers'; +import { hxroManifestCache } from '../cache'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + makeConfirmOptionsFinalizedOnMainnet, + useOperation, +} from '@/types'; +import { SendAndConfirmTransactionResponse } from '@/plugins'; +import { TransactionBuilder, TransactionBuilderOptions } from '@/utils'; + +const Key = 'InitializeOperatorTraderRiskGroup' as const; + +export const initializeOperatorTraderRiskGroupOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type InitializeOperatorTraderRiskGroupOperation = Operation< + typeof Key, + InitializeOperatorTraderRiskGroupInput, + InitializeOperatorTraderRiskGroupOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type InitializeOperatorTraderRiskGroupInput = { + // Optional keypair which would be used as an account for trg + // A new account would be generated otherwise + trgAccount?: Keypair; + + // Optional keypair which would be used as an account for trg risk state + // A new account would be generated otherwise + riskStateAccount?: Keypair; + + // Allows overriding a hxro risk engine address compared to SDK + // This is used primarily in tests + hxroRiskEngineAddress?: PublicKey; +}; + +/** + * @group Operations + * @category Outputs + */ +export type InitializeOperatorTraderRiskGroupOutput = + SendAndConfirmTransactionResponse; + +/** + * @group Operations + * @category Handlers + */ +export const initializeOperatorTraderRiskGroupOperationHandler: OperationHandler = + { + handle: async ( + operation: InitializeOperatorTraderRiskGroupOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const builder = await initializeOperatorTraderRiskGroupBuilder( + cvg, + operation.input, + scope + ); + scope.throwIfCanceled(); + + const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( + cvg, + scope.confirmOptions + ); + const output = await builder.sendAndConfirm(cvg, confirmOptions); + scope.throwIfCanceled(); + return output.response; + }, + }; + +export const initializeOperatorTraderRiskGroupBuilder = async ( + cvg: Convergence, + params: InitializeOperatorTraderRiskGroupInput, + options: TransactionBuilderOptions = {} +): Promise> => { + const { + trgAccount = new Keypair(), + riskStateAccount = new Keypair(), + hxroRiskEngineAddress, + } = params; + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + + const manifest = await hxroManifestCache.get(cvg); + const hxroPrintTradeProviderProgram = cvg + .programs() + .getHxroPrintTradeProvider(); + const systemProgram = cvg.programs().getSystem(programs); + + const { dexProgram } = manifest.fields; + const { + pubkey: mpgAddress, + feeModelProgramId, + feeModelConfigurationAcct, + } = await fetchValidHxroMpg(cvg, manifest); + const [traderFeeStateAcct] = PublicKey.findProgramAddressSync( + [ + mpgAddress.toBuffer(), + trgAccount.publicKey.toBuffer(), + feeModelConfigurationAcct.toBuffer(), + ], + feeModelProgramId + ); + + const riskEngineProgram = + hxroRiskEngineAddress ?? manifest.fields.riskProgram.programId; + const createTrgInstruction = + await dexProgram.account.traderRiskGroup.createInstruction( + trgAccount, + 64336 // copied from hxro SDK TRG_SIZE variable + ); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction: createTrgInstruction, + signers: [payer, trgAccount], + key: 'createOperatorTraderRiskGroupAccount', + }) + .add({ + instruction: SystemProgram.transfer({ + fromPubkey: cvg.identity().publicKey, + toPubkey: cvg.hxro().pdas().operator(), + lamports: 1 * 10 ** 9, // 1 sol + }), + signers: [payer], + key: 'fundOperator', + }) + .add({ + instruction: createInitializeOperatorTraderRiskGroupInstruction( + { + authority: cvg.identity().publicKey, + protocol: cvg.protocol().pdas().protocol(), + config: cvg.hxro().pdas().config(), + marketProductGroup: mpgAddress, + operator: cvg.hxro().pdas().operator(), + dex: manifest.fields.dexProgram.programId, + operatorTrg: trgAccount.publicKey, + riskAndFeeSigner: dexterity.Manifest.GetRiskAndFeeSigner(mpgAddress), + traderRiskStateAcct: riskStateAccount.publicKey, + traderFeeStateAcct, + riskEngineProgram, + feeModelConfigAcct: feeModelConfigurationAcct, + feeModelProgram: feeModelProgramId, + systemProgram: systemProgram.address, + }, + hxroPrintTradeProviderProgram.address + ), + signers: [payer, riskStateAccount], + key: 'initializeOperatorTraderRiskGroup', + }); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/lockHxroCollateral.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/lockHxroCollateral.ts new file mode 100644 index 000000000..fa9084044 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/lockHxroCollateral.ts @@ -0,0 +1,119 @@ +import BN from 'bn.js'; +import BigNumber from 'bignumber.js'; +import { getHxroProgramFromIDL } from '../program'; +import type { HxroContextHelper, HxroLeg } from '../printTrade'; +import { HXRO_LEG_DECIMALS } from '../constants'; +import { Convergence } from '@/Convergence'; +import { TransactionBuilder, TransactionBuilderOptions } from '@/utils'; +import { PublicKey } from '@/types'; +import { + AuthoritySide, + PrintTradeResponse, + PrintTradeRfq, +} from '@/plugins/rfqModule'; + +export type LockHxroCollateralParams = { + rfq: PrintTradeRfq; + response: PrintTradeResponse; + side: AuthoritySide; + hxroContext: HxroContextHelper; +}; + +export const lockHxroCollateralBuilder = async ( + cvg: Convergence, + params: LockHxroCollateralParams, + options: TransactionBuilderOptions = {} +): Promise> => { + const { rfq, response, side, hxroContext } = params; + const { payer = cvg.rpc().getDefaultFeePayer() } = options; + + const { mpg, manifest } = hxroContext; + const userTrg = await hxroContext.getTrgDataBySide(side).get(); + + const [covarianceAddress] = PublicKey.findProgramAddressSync( + [Buffer.from('s'), mpg.pubkey.toBuffer()], + mpg.riskEngineProgramId + ); + const [correlationAddress] = PublicKey.findProgramAddressSync( + [Buffer.from('r'), mpg.pubkey.toBuffer()], + mpg.riskEngineProgramId + ); + const [markPricesAddress] = PublicKey.findProgramAddressSync( + [Buffer.from('mark_prices'), mpg.pubkey.toBuffer()], + mpg.riskEngineProgramId + ); + + const settlementResult = cvg.rfqs().getSettlementResult({ rfq, response }); + + const products = []; + for (let i = 0; i < 6; i++) { + if (i < rfq.legs.length) { + const legResult = settlementResult.legs[i]; + let amount = new BigNumber(legResult.amount).times( + new BigNumber(10).pow(HXRO_LEG_DECIMALS) + ); + if (legResult.receiver !== side) { + amount = amount.negated(); + } + + products.push({ + productIndex: new BN( + (rfq.legs[i] as HxroLeg).legInfo.productInfo.productIndex + ), + size: { m: new BN(amount.toString()), exp: new BN(HXRO_LEG_DECIMALS) }, + }); + } else { + products.push({ + productIndex: new BN(0), + size: { m: new BN(0), exp: new BN(0) }, + }); + } + } + + const idlProgram = await getHxroProgramFromIDL(cvg, manifest); + const instruction = await idlProgram.methods + .lockCollateral({ + numProducts: new BN(rfq.legs.length), + products, + }) + .accounts({ + user: payer.publicKey, + traderRiskGroup: hxroContext.getTrgBySide(side), + marketProductGroup: mpg.pubkey, + feeModelProgram: mpg.feeModelProgramId, + feeModelConfigurationAcct: mpg.feeModelConfigurationAcct, + feeOutputRegister: mpg.feeOutputRegister, + riskEngineProgram: mpg.riskEngineProgramId, + riskModelConfigurationAcct: mpg.riskModelConfigurationAcct, + riskOutputRegister: mpg.riskOutputRegister, + riskAndFeeSigner: hxroContext.getRiskAndFeeSigner(), + feeStateAcct: userTrg.feeStateAccount, + riskStateAcct: userTrg.riskStateAccount, + }) + .remainingAccounts([ + { + pubkey: covarianceAddress, + isSigner: false, + isWritable: true, + }, + { + pubkey: correlationAddress, + isSigner: false, + isWritable: true, + }, + { + pubkey: markPricesAddress, + isSigner: false, + isWritable: true, + }, + ]) + .instruction(); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction, + signers: [payer], + key: 'lockHxroCollateral', + }); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/modifyHxroConfig.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/modifyHxroConfig.ts new file mode 100644 index 000000000..c7bd49d70 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/modifyHxroConfig.ts @@ -0,0 +1,103 @@ +import { createModifyConfigInstruction } from '@convergence-rfq/hxro-print-trade-provider'; +import { configCache } from '../cache'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + PublicKey, + makeConfirmOptionsFinalizedOnMainnet, + useOperation, +} from '@/types'; +import { SendAndConfirmTransactionResponse } from '@/plugins'; +import { TransactionBuilder, TransactionBuilderOptions } from '@/utils'; + +const Key = 'ModifyHxroConfig' as const; + +export const modifyHxroConfigOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type ModifyHxroConfigOperation = Operation< + typeof Key, + ModifyHxroConfigInput, + ModifyHxroConfigOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type ModifyHxroConfigInput = { + validMpg: PublicKey; + + authority?: PublicKey; +}; + +/** + * @group Operations + * @category Outputs + */ +export type ModifyHxroConfigOutput = SendAndConfirmTransactionResponse; + +/** + * @group Operations + * @category Handlers + */ +export const modifyHxroConfigOperationHandler: OperationHandler = + { + handle: async ( + operation: ModifyHxroConfigOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const builder = await modifyHxroBuilder(cvg, operation.input, scope); + scope.throwIfCanceled(); + + const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( + cvg, + scope.confirmOptions + ); + configCache.clear(); + const output = await builder.sendAndConfirm(cvg, confirmOptions); + scope.throwIfCanceled(); + return output.response; + }, + }; + +export const modifyHxroBuilder = async ( + cvg: Convergence, + params: ModifyHxroConfigInput, + options: TransactionBuilderOptions = {} +): Promise> => { + const { authority = cvg.identity().publicKey, validMpg } = params; + const { payer = cvg.rpc().getDefaultFeePayer() } = options; + + const hxroPrintTradeProviderProgram = cvg + .programs() + .getHxroPrintTradeProvider(); + + const protocol = cvg.protocol().pdas().protocol(); + const config = cvg.hxro().pdas().config(); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction: createModifyConfigInstruction( + { + protocol, + authority, + config, + }, + { + validMpg, + }, + hxroPrintTradeProviderProgram.address + ), + signers: [payer], + key: 'ModifyHxroConfig', + }); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/signHxroPrintTrade.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/signHxroPrintTrade.ts new file mode 100644 index 000000000..db67a8dfa --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/signHxroPrintTrade.ts @@ -0,0 +1,109 @@ +import BN from 'bn.js'; +import { SystemProgram } from '@solana/web3.js'; +import { getHxroProgramFromIDL } from '../program'; +import { numberToHxroFractional } from '../helpers'; +import type { HxroContextHelper, HxroLeg } from '../printTrade'; +import { Convergence } from '@/Convergence'; +import { TransactionBuilder, TransactionBuilderOptions } from '@/utils'; +import { + AuthoritySide, + PrintTradeResponse, + PrintTradeRfq, +} from '@/plugins/rfqModule'; + +export type SignHxroPrintTradeParams = { + rfq: PrintTradeRfq; + response: PrintTradeResponse; + side: AuthoritySide; + hxroContext: HxroContextHelper; +}; + +export const signHxroPrintTradeBuilder = async ( + cvg: Convergence, + params: SignHxroPrintTradeParams, + options: TransactionBuilderOptions = {} +): Promise> => { + const { rfq, response, side, hxroContext } = params; + const { payer = cvg.rpc().getDefaultFeePayer() } = options; + + const settlementResult = cvg.rfqs().getSettlementResult({ rfq, response }); + const products = []; + for (let i = 0; i < 6; i++) { + if (i < rfq.legs.length) { + const legResult = settlementResult.legs[i]; + + const productIndex = new BN( + (rfq.legs[i] as HxroLeg).legInfo.productInfo.productIndex + ); + const size = numberToHxroFractional( + legResult.amount, + legResult.receiver === 'maker' + ); + + products.push({ + productIndex, + size, + }); + } else { + products.push({ + productIndex: new BN(0), + size: { m: new BN(0), exp: new BN(0) }, + }); + } + } + + const quoteSettlement = settlementResult.quote; + const price = numberToHxroFractional( + quoteSettlement.amount, + quoteSettlement.receiver == 'taker' + ); + + const printTradeSide = side === 'taker' ? { bid: {} } : { ask: {} }; + + const [creatorTrgData, counterpartyTrgData, operatorTrg] = await Promise.all([ + hxroContext.creatorTrgData.get(), + hxroContext.counterpartyTrgData.get(), + hxroContext.operatorTrg.get(), + ]); + + const idlProgram = await getHxroProgramFromIDL(cvg, hxroContext.manifest); + const instruction = await idlProgram.methods + .signPrintTrade({ + numProducts: new BN(rfq.legs.length), + products, + operatorCounterpartyFeeProportion: { m: new BN(0), exp: new BN(0) }, + operatorCreatorFeeProportion: { m: new BN(0), exp: new BN(0) }, + price, + side: printTradeSide, + }) + .accounts({ + user: payer.publicKey, + creator: hxroContext.getCreatorTrg(), + counterparty: hxroContext.getCounterpartyTrg(), + operator: operatorTrg, + marketProductGroup: hxroContext.mpg.pubkey, + printTrade: hxroContext.getPrintTrade(), + systemProgram: SystemProgram.programId, + feeModelProgram: hxroContext.mpg.feeModelProgramId, + feeModelConfigurationAcct: hxroContext.mpg.feeModelConfigurationAcct, + feeOutputRegister: hxroContext.mpg.feeOutputRegister, + riskEngineProgram: hxroContext.mpg.riskEngineProgramId, + riskModelConfigurationAcct: hxroContext.mpg.riskModelConfigurationAcct, + riskOutputRegister: hxroContext.mpg.riskOutputRegister, + riskAndFeeSigner: hxroContext.getRiskAndFeeSigner(), + creatorTraderFeeStateAcct: creatorTrgData.feeStateAccount, + creatorTraderRiskStateAcct: creatorTrgData.riskStateAccount, + counterpartyTraderFeeStateAcct: counterpartyTrgData.feeStateAccount, + counterpartyTraderRiskStateAcct: counterpartyTrgData.riskStateAccount, + seed: response.address, + }) + .instruction(); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction, + signers: [payer], + key: 'signHxroPrintTrade', + }); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/unlockHxroCollateralByRecord.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/unlockHxroCollateralByRecord.ts new file mode 100644 index 000000000..88fed30bc --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/operations/unlockHxroCollateralByRecord.ts @@ -0,0 +1,207 @@ +import { + LockedCollateralRecord, + LockedCollateralRecordArgs, + createRemoveLockedCollateralRecordInstruction, +} from '@convergence-rfq/hxro-print-trade-provider'; +import dexterity from '@hxronetwork/dexterity-ts'; + +import BN from 'bn.js'; +import { getHxroProgramFromIDL } from '../program'; +import { fetchValidHxroMpg } from '../helpers'; +import { hxroManifestCache } from '../cache'; +import { WithPubkey } from '../types'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + PublicKey, + useOperation, +} from '@/types'; +import { TransactionBuilder, TransactionBuilderOptions } from '@/utils'; +import { SendAndConfirmTransactionResponse } from '@/plugins/rpcModule'; + +const Key = 'unlockHxroCollateralByRecord' as const; + +export const unlockHxroCollateralByRecordOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type UnlockHxroCollateralByRecordOperation = Operation< + typeof Key, + UnlockHxroCollateralByRecordInput, + UnlockHxroCollateralByRecordOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type UnlockHxroCollateralByRecordInput = { + lockRecord: PublicKey | WithPubkey; + + // 'unlock-and-remove-record' is a default action + action?: 'unlock' | 'remove-record' | 'unlock-and-remove-record'; +}; +/** + * @group Operations + * @category Outputs + */ +export type UnlockHxroCollateralByRecordOutput = + SendAndConfirmTransactionResponse; + +/** + * @group Operations + * @category Handlers + */ +export const unlockHxroCollateralByRecordOperationHandler: OperationHandler = + { + handle: async ( + operation: UnlockHxroCollateralByRecordOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const { + input: { lockRecord, action = 'unlock-and-remove-record' }, + } = operation; + + let lockRecordData: WithPubkey; + if ('publicKey' in lockRecord) { + lockRecordData = lockRecord; + } else { + const accountData = await LockedCollateralRecord.fromAccountAddress( + cvg.connection, + lockRecord + ); + lockRecordData = { ...accountData, publicKey: lockRecord }; + } + + const builder = TransactionBuilder.make().setFeePayer(cvg.identity()); + if (action == 'unlock' || action == 'unlock-and-remove-record') { + builder.add( + await unlockHxroCollateralBuilder( + cvg, + { + lockRecord: lockRecordData, + }, + scope + ) + ); + } + + if (action == 'remove-record' || action == 'unlock-and-remove-record') { + builder.add( + await removeLockCollateralRecordBuilder( + cvg, + { + lockRecord: lockRecordData, + }, + scope + ) + ); + } + + const output = await builder.sendAndConfirm(cvg, scope.confirmOptions); + return output.response; + }, + }; + +export const removeLockCollateralRecordBuilder = async ( + cvg: Convergence, + params: { lockRecord: WithPubkey }, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { lockRecord } = params; + + return TransactionBuilder.make() + .setFeePayer(payer) + .add({ + instruction: createRemoveLockedCollateralRecordInstruction( + { + user: cvg.identity().publicKey, + lockedCollateralRecord: lockRecord.publicKey, + }, + cvg.programs().getHxroPrintTradeProvider(programs).address + ), + signers: [cvg.identity()], + key: 'removeLockCollateralRecord', + }); +}; + +export const unlockHxroCollateralBuilder = async ( + cvg: Convergence, + params: { lockRecord: LockedCollateralRecordArgs }, + options: TransactionBuilderOptions = {} +): Promise> => { + const { lockRecord } = params; + const { payer = cvg.rpc().getDefaultFeePayer() } = options; + + const manifest = await hxroManifestCache.get(cvg); + const mpg = await fetchValidHxroMpg(cvg, manifest); + + const userTrg = await manifest.getTRG(lockRecord.trg); + + const [covarianceAddress] = PublicKey.findProgramAddressSync( + [Buffer.from('s'), mpg.pubkey.toBuffer()], + mpg.riskEngineProgramId + ); + const [correlationAddress] = PublicKey.findProgramAddressSync( + [Buffer.from('r'), mpg.pubkey.toBuffer()], + mpg.riskEngineProgramId + ); + const [markPricesAddress] = PublicKey.findProgramAddressSync( + [Buffer.from('mark_prices'), mpg.pubkey.toBuffer()], + mpg.riskEngineProgramId + ); + + const idlProgram = await getHxroProgramFromIDL(cvg, manifest); + const instruction = await idlProgram.methods + .unlockCollateral({ + numProducts: new BN(6), + products: lockRecord.locks, + }) + .accounts({ + user: payer.publicKey, + traderRiskGroup: lockRecord.trg, + marketProductGroup: mpg.pubkey, + feeModelProgram: mpg.feeModelProgramId, + feeModelConfigurationAcct: mpg.feeModelConfigurationAcct, + feeOutputRegister: mpg.feeOutputRegister, + riskEngineProgram: mpg.riskEngineProgramId, + riskModelConfigurationAcct: mpg.riskModelConfigurationAcct, + riskOutputRegister: mpg.riskOutputRegister, + riskAndFeeSigner: dexterity.Manifest.GetRiskAndFeeSigner(mpg.pubkey), + feeStateAcct: userTrg.feeStateAccount, + riskStateAcct: userTrg.riskStateAccount, + }) + .remainingAccounts([ + { + pubkey: covarianceAddress, + isSigner: false, + isWritable: true, + }, + { + pubkey: correlationAddress, + isSigner: false, + isWritable: true, + }, + { + pubkey: markPricesAddress, + isSigner: false, + isWritable: true, + }, + ]) + .instruction(); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction, + signers: [payer], + key: 'unlockHxroCollateral', + }); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/pdas.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/pdas.ts new file mode 100644 index 000000000..bc01a08aa --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/pdas.ts @@ -0,0 +1,29 @@ +import { Convergence } from '@/Convergence'; +import { Pda, Program, PublicKey } from '@/types'; + +export class HxroPdasClient { + constructor(protected readonly cvg: Convergence) {} + + config(): Pda { + const programId = this.programId(); + return Pda.find(programId, [Buffer.from('config', 'utf8')]); + } + + operator(): Pda { + const programId = this.programId(); + return Pda.find(programId, [Buffer.from('operator', 'utf8')]); + } + + lockedCollateralRecord(user: PublicKey, response: PublicKey): Pda { + const programId = this.programId(); + return Pda.find(programId, [ + Buffer.from('locked_collateral_record', 'utf8'), + user.toBuffer(), + response.toBuffer(), + ]); + } + + private programId(programs?: Program[]) { + return this.cvg.programs().getHxroPrintTradeProvider(programs).address; + } +} diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/plugin.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/plugin.ts new file mode 100644 index 000000000..ce50b540a --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/plugin.ts @@ -0,0 +1,87 @@ +import { ProgramClient } from '../programModule'; +import { HxroClient } from './client'; +import { + fetchHxroPrintTradeProviderConfigOperation, + fetchHxroPrintTradeProviderConfigOperationHandler, + fetchHxroProductsOperation, + fetchHxroProductsOperationHandler, + fetchUnusedCollateralLockRecordsOperation, + fetchUnusedCollateralLockRecordsOperationHandler, + initializeHxroConfigOperation, + initializeHxroConfigOperationHandler, + initializeOperatorTraderRiskGroupOperation, + initializeOperatorTraderRiskGroupOperationHandler, + modifyHxroConfigOperation, + modifyHxroConfigOperationHandler, + unlockHxroCollateralByRecordOperation, + unlockHxroCollateralByRecordOperationHandler, + getRequiredHxroCollateralForSettlementOperation, + getRequiredHxroCollateralForSettlementOperationHandler, +} from './operations'; +import { hxroPrintTradeProviderProgram } from './program'; +import { HxroPrintTradeParser } from './printTrade'; +import type { Convergence } from '@/Convergence'; +import { ConvergencePlugin, Program } from '@/types'; + +export const hxroModule = (): ConvergencePlugin => ({ + install(convergence: Convergence) { + convergence.programs().register(hxroPrintTradeProviderProgram); + convergence.programs().getHxroPrintTradeProvider = function ( + this: ProgramClient, + programs?: Program[] + ) { + return this.get(hxroPrintTradeProviderProgram.name, programs); + }; + + const op = convergence.operations(); + + op.register( + fetchHxroPrintTradeProviderConfigOperation, + fetchHxroPrintTradeProviderConfigOperationHandler + ); + op.register(fetchHxroProductsOperation, fetchHxroProductsOperationHandler); + op.register( + initializeHxroConfigOperation, + initializeHxroConfigOperationHandler + ); + op.register(modifyHxroConfigOperation, modifyHxroConfigOperationHandler); + op.register( + initializeOperatorTraderRiskGroupOperation, + initializeOperatorTraderRiskGroupOperationHandler + ); + op.register( + fetchUnusedCollateralLockRecordsOperation, + fetchUnusedCollateralLockRecordsOperationHandler + ); + op.register( + unlockHxroCollateralByRecordOperation, + unlockHxroCollateralByRecordOperationHandler + ); + + op.register( + getRequiredHxroCollateralForSettlementOperation, + getRequiredHxroCollateralForSettlementOperationHandler + ); + + convergence.hxro = function () { + return new HxroClient(this); + }; + + convergence.addPrintTradeParser( + hxroPrintTradeProviderProgram.address, + new HxroPrintTradeParser() + ); + }, +}); + +declare module '../../Convergence' { + interface Convergence { + hxro(): HxroClient; + } +} + +declare module '../programModule/ProgramClient' { + interface ProgramClient { + getHxroPrintTradeProvider(programs?: Program[]): Program; + } +} diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/printTrade.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/printTrade.ts new file mode 100644 index 000000000..9bb9c8c12 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/printTrade.ts @@ -0,0 +1,730 @@ +import { + futureCommonDataBeet, + optionCommonDataBeet, +} from '@convergence-rfq/risk-engine'; +import dexterity from '@hxronetwork/dexterity-ts'; +import BN from 'bn.js'; +import { + Leg as SolitaLeg, + QuoteAsset as SolitaQuoteAsset, +} from '@convergence-rfq/rfq'; +import { LockedCollateralRecord } from '@convergence-rfq/hxro-print-trade-provider'; +import { + AdditionalResponseData, + PrintTrade, + PrintTradeLeg, + PrintTradeParser, + PrintTradeQuote, +} from '../printTradeModule'; +import { fromNumberInstrumentType } from '../riskEngineModule'; +import { + AuthoritySide, + fromSolitaLegSide, + PrintTradeRfq, + PrintTradeResponse, +} from '../rfqModule'; +import { HXRO_LEG_DECIMALS, HXRO_QUOTE_DECIMALS } from './constants'; +import { HxroLegInput, HxroProductInfo } from './types'; +import { fetchValidHxroMpg, getFirstHxroExecutionOutput } from './helpers'; +import { hxroManifestCache } from './cache'; +import { + lockHxroCollateralBuilder, + removeLockCollateralRecordBuilder, + signHxroPrintTradeBuilder, + unlockHxroCollateralBuilder, +} from './operations'; +import { Convergence } from '@/Convergence'; +import { + PublicKey, + createSerializerFromFixedSizeBeet, + toFractional, +} from '@/types'; +import { + CvgCache, + TransactionBuilderOptions, + removeDecimals, + useCache, +} from '@/utils'; + +export class HxroPrintTrade implements PrintTrade { + constructor( + protected cvg: Convergence, + public takerTrg: PublicKey, + protected legsInfo: HxroLegInput[] + ) {} + getHxroContextHelper = async ( + cvg: Convergence, + response: PrintTradeResponse, + firstToPrepare: AuthoritySide + ) => { + return HxroContextHelper.create(cvg, this, response, firstToPrepare); + }; + getPrintTradeProviderProgramId = () => + this.cvg.programs().getHxroPrintTradeProvider().address; + getLegs = () => this.legsInfo.map((legInfo) => new HxroLeg(legInfo)); + getQuote = () => new HxroQuote(this.takerTrg); + getValidationAccounts = async () => { + const { validMpg } = await this.cvg.hxro().fetchConfig(); + + const validationAccounts = this.legsInfo + .map((legInfo) => { + // TODO add in-place product fetching + if (legInfo.productInfo.productAddress === undefined) { + throw Error('Product addresses not fetched!'); + } + + const productAccountInfo = { + pubkey: legInfo.productInfo.productAddress, + isSigner: false, + isWritable: false, + }; + + const baseAssetAccountInfo = { + pubkey: this.cvg + .protocol() + .pdas() + .baseAsset({ index: legInfo.productInfo.baseAssetIndex }), + isSigner: false, + isWritable: false, + }; + + return [productAccountInfo, baseAssetAccountInfo]; + }) + .flat(); + + return [ + { + pubkey: this.cvg.hxro().pdas().config(), + isSigner: false, + isWritable: false, + }, + { + pubkey: validMpg, + isSigner: false, + isWritable: false, + }, + { + pubkey: this.takerTrg, + isSigner: false, + isWritable: false, + }, + ...validationAccounts, + ]; + }; + + getSettlementPreparations = async ( + rfq: PrintTradeRfq, + response: PrintTradeResponse, + side: AuthoritySide, + options: TransactionBuilderOptions + ) => { + const user = side === 'taker' ? rfq.taker : response.maker; + + const hxroContext = await HxroContextHelper.create( + this.cvg, + this, + response, + response.printTradeInitializedBy ?? side + ); + + const systemProgram = this.cvg.programs().getSystem(); + + const builders = [ + await lockHxroCollateralBuilder( + this.cvg, + { rfq, response, side, hxroContext }, + options + ), + ]; + if (response.printTradeInitializedBy !== null) { + builders.push( + await signHxroPrintTradeBuilder( + this.cvg, + { rfq, response, side, hxroContext }, + options + ) + ); + } + + const operatorTrg = await hxroContext.operatorTrg.get(); + + const accounts = [ + { + pubkey: this.cvg + .hxro() + .pdas() + .lockedCollateralRecord(user, response.address), + isSigner: false, + isWritable: true, + }, + { + pubkey: this.cvg.hxro().pdas().operator(), + isSigner: false, + isWritable: false, + }, + { + pubkey: this.cvg.hxro().pdas().config(), + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.getDexProgramId(), + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.mpg.pubkey, + isSigner: false, + isWritable: true, + }, + { + pubkey: this.cvg.identity().publicKey, + isSigner: true, + isWritable: false, + }, + { + pubkey: hxroContext.getTakerTrg(), + isSigner: false, + isWritable: true, + }, + { + pubkey: hxroContext.getMakerTrg(), + isSigner: false, + isWritable: true, + }, + { + pubkey: operatorTrg, + isSigner: false, + isWritable: true, + }, + { + pubkey: hxroContext.getPrintTrade(), + isSigner: false, + isWritable: true, + }, + { pubkey: systemProgram.address, isSigner: false, isWritable: false }, + ]; + + return { accounts, builders }; + }; + + getSettlementAccounts = async ( + rfq: PrintTradeRfq, + response: PrintTradeResponse + ) => { + const hxroContext = await HxroContextHelper.create( + this.cvg, + this, + response, + response.printTradeInitializedBy! + ); + const systemProgram = this.cvg.programs().getSystem(); + + const executionOutput = await getFirstHxroExecutionOutput( + this.cvg, + hxroContext.getDexProgramId() + ); + + const [creatorTrgData, counterpartyTrgData, operatorTrg] = + await Promise.all([ + hxroContext.creatorTrgData.get(), + hxroContext.counterpartyTrgData.get(), + hxroContext.operatorTrg.get(), + ]); + + return [ + { + pubkey: rfq.taker, + isSigner: false, + isWritable: true, + }, + { + pubkey: response.maker, + isSigner: false, + isWritable: true, + }, + { + pubkey: this.cvg + .hxro() + .pdas() + .lockedCollateralRecord(rfq.taker, response.address), + isSigner: false, + isWritable: true, + }, + { + pubkey: this.cvg + .hxro() + .pdas() + .lockedCollateralRecord(response.maker, response.address), + isSigner: false, + isWritable: true, + }, + { + pubkey: this.cvg.hxro().pdas().operator(), + isSigner: false, + isWritable: true, + }, + { + pubkey: this.cvg.hxro().pdas().config(), + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.getDexProgramId(), + isSigner: false, + isWritable: false, + }, + { pubkey: hxroContext.mpg.pubkey, isSigner: false, isWritable: true }, + { pubkey: hxroContext.getTakerTrg(), isSigner: false, isWritable: true }, + { pubkey: hxroContext.getMakerTrg(), isSigner: false, isWritable: true }, + { + pubkey: operatorTrg, + isSigner: false, + isWritable: true, + }, + { + pubkey: hxroContext.getPrintTrade(), + isSigner: false, + isWritable: true, + }, + { pubkey: executionOutput, isSigner: false, isWritable: true }, + { + pubkey: hxroContext.mpg.feeModelProgramId, + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.mpg.feeModelConfigurationAcct, + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.mpg.feeOutputRegister, + isSigner: false, + isWritable: true, + }, + { + pubkey: hxroContext.mpg.riskEngineProgramId, + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.mpg.riskModelConfigurationAcct, + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.mpg.riskOutputRegister, + isSigner: false, + isWritable: true, + }, + { + pubkey: hxroContext.getRiskAndFeeSigner(), + isSigner: false, + isWritable: false, + }, + { + pubkey: creatorTrgData.feeStateAccount, + isSigner: false, + isWritable: true, + }, + { + pubkey: creatorTrgData.riskStateAccount, + isSigner: false, + isWritable: true, + }, + { + pubkey: counterpartyTrgData.feeStateAccount, + isSigner: false, + isWritable: true, + }, + { + pubkey: counterpartyTrgData.riskStateAccount, + isSigner: false, + isWritable: true, + }, + { pubkey: systemProgram.address, isSigner: false, isWritable: false }, + ]; + }; + + getRevertPreparations = async ( + rfq: PrintTradeRfq, + response: PrintTradeResponse, + side: AuthoritySide, + options: TransactionBuilderOptions + ) => { + const user = side === 'taker' ? rfq.taker : response.maker; + + const postBuilders = []; + if (this.cvg.identity().publicKey.equals(user)) { + const lockRecordAddress = this.cvg + .hxro() + .pdas() + .lockedCollateralRecord(user, response.address); + + const accountData = await LockedCollateralRecord.fromAccountAddress( + this.cvg.connection, + lockRecordAddress + ); + const lockRecord = { ...accountData, publicKey: lockRecordAddress }; + + postBuilders.push( + await unlockHxroCollateralBuilder(this.cvg, { lockRecord }, options) + ); + postBuilders.push( + await removeLockCollateralRecordBuilder( + this.cvg, + { lockRecord }, + options + ) + ); + } + + const accounts = [ + { + pubkey: this.cvg + .hxro() + .pdas() + .lockedCollateralRecord(user, response.address), + isSigner: false, + isWritable: true, + }, + ]; + + return { accounts, postBuilders }; + }; + + getCleanUpAccounts = async ( + rfq: PrintTradeRfq, + response: PrintTradeResponse + ) => { + const hxroContext = await HxroContextHelper.create( + this.cvg, + this, + response, + response.printTradeInitializedBy! + ); + const systemProgram = this.cvg.programs().getSystem(); + const creator = + response.printTradeInitializedBy! === 'taker' + ? rfq.taker + : response.maker; + + const operatorTrg = await hxroContext.operatorTrg.get(); + + return [ + { + pubkey: this.cvg.hxro().pdas().operator(), + isSigner: false, + isWritable: true, + }, + { + pubkey: this.cvg.hxro().pdas().config(), + isSigner: false, + isWritable: false, + }, + { + pubkey: hxroContext.getDexProgramId(), + isSigner: false, + isWritable: false, + }, + { pubkey: hxroContext.mpg.pubkey, isSigner: false, isWritable: true }, + { pubkey: hxroContext.getTakerTrg(), isSigner: false, isWritable: true }, + { pubkey: hxroContext.getMakerTrg(), isSigner: false, isWritable: true }, + { + pubkey: operatorTrg, + isSigner: false, + isWritable: true, + }, + { + pubkey: hxroContext.getPrintTrade(), + isSigner: false, + isWritable: true, + }, + { pubkey: creator, isSigner: false, isWritable: true }, + { pubkey: systemProgram.address, isSigner: false, isWritable: false }, + ]; + }; + + // after an rfq is parsed from an on-chain data, as much data is possible is parsed from there + // but some product info is missing in the rfq on-chain data + // this method overwrites hxro product data and can be used to fill all the missing data + overwriteWithFullHxroProductData = (fullProductsData: HxroProductInfo[]) => { + for (const legInfo of this.legsInfo) { + const fullProductData = fullProductsData.find( + (data) => data.productIndex === legInfo.productInfo.productIndex + ); + + if (fullProductData === undefined) { + throw new Error( + `Missing a product by index ${legInfo.productInfo.productIndex}` + ); + } + + legInfo.productInfo = fullProductData; + } + }; + + getValidateResponseAccounts = async ( + additionalData: AdditionalResponseData | undefined + ) => { + if (!(additionalData instanceof HxroAdditionalRespondData)) { + throw new Error( + 'This rfq requires hxro-specific HxroAdditionalRespondData type passed as an additional response data' + ); + } + + return [ + { + pubkey: this.cvg.hxro().pdas().config(), + isSigner: false, + isWritable: false, + }, + { + pubkey: additionalData.makerTrg, + isSigner: false, + isWritable: false, + }, + ]; + }; +} + +export class HxroPrintTradeParser implements PrintTradeParser { + parsePrintTrade( + cvg: Convergence, + legs: SolitaLeg[], + quote: SolitaQuoteAsset + ): PrintTrade { + const parsedLegInfo = legs.map((leg): HxroLegInput => { + if (leg.settlementTypeMetadata.__kind == 'Instrument') { + throw new Error('Invalid settlement leg type'); + } + + const instrumentType = fromNumberInstrumentType( + leg.settlementTypeMetadata.instrumentType + ); + let productInfo; + if (instrumentType == 'option') { + const serializer = + createSerializerFromFixedSizeBeet(optionCommonDataBeet); + const legData = Buffer.from(leg.data); + const [optionData, offset] = serializer.deserialize(legData); + const productIndex = legData.readUInt8(offset); + + productInfo = { + instrumentType, + baseAssetIndex: leg.baseAssetIndex.value, + productIndex, + optionType: optionData.optionType, + strikePrice: toFractional( + optionData.strikePrice, + optionData.strikePriceDecimals + ), + expirationTimestamp: Number(optionData.expirationTimestamp), + }; + } else if ( + instrumentType == 'perp-future' || + instrumentType == 'term-future' + ) { + const serializer = + createSerializerFromFixedSizeBeet(futureCommonDataBeet); + const legData = Buffer.from(leg.data); + const [, offset] = serializer.deserialize(legData); + const productIndex = legData.readUInt8(offset); + + productInfo = { + instrumentType, + baseAssetIndex: leg.baseAssetIndex.value, + productIndex, + }; + } else { + throw new Error('Unsupporeted instrument type!'); + } + + return { + amount: removeDecimals(leg.amount, leg.amountDecimals), + side: fromSolitaLegSide(leg.side), + productInfo, + }; + }); + const takerTrg = new PublicKey(quote.data); + + return new HxroPrintTrade(cvg, takerTrg, parsedLegInfo); + } +} + +class HxroQuote implements PrintTradeQuote { + constructor(public takerTrg: PublicKey) {} + + getDecimals = () => HXRO_QUOTE_DECIMALS; + serializeInstrumentData = () => this.takerTrg.toBuffer(); +} + +export class HxroLeg implements PrintTradeLeg { + legType: 'printTrade'; + + constructor(public legInfo: HxroLegInput) { + this.legType = 'printTrade'; + } + + getInstrumentType = () => this.legInfo.productInfo.instrumentType; + getBaseAssetIndex = () => ({ + value: this.legInfo.productInfo.baseAssetIndex, + }); + getAmount = () => this.legInfo.amount; + getDecimals = () => HXRO_LEG_DECIMALS; + getSide = () => this.legInfo.side; + serializeInstrumentData = () => { + let riskEngineBuffer; + if (this.legInfo.productInfo.instrumentType == 'option') { + const serializer = + createSerializerFromFixedSizeBeet(optionCommonDataBeet); + riskEngineBuffer = serializer.serialize({ + optionType: this.legInfo.productInfo.optionType, + underlyingAmountPerContract: new BN(1), + underlyingAmountPerContractDecimals: 0, + strikePrice: this.legInfo.productInfo.strikePrice.mantissa, + strikePriceDecimals: this.legInfo.productInfo.strikePrice.decimals, + expirationTimestamp: new BN( + this.legInfo.productInfo.expirationTimestamp + ), + }); + } else { + const serializer = + createSerializerFromFixedSizeBeet(futureCommonDataBeet); + riskEngineBuffer = serializer.serialize({ + underlyingAmountPerContract: new BN(1), + underlyingAmountPerContractDecimals: 0, + }); + } + + const productInfoBuffer = Buffer.alloc(1); + productInfoBuffer.writeUInt8(this.legInfo.productInfo.productIndex); + + return Buffer.concat([riskEngineBuffer, productInfoBuffer]); + }; +} + +export class HxroAdditionalRespondData extends AdditionalResponseData { + constructor(public makerTrg: PublicKey) { + super(); + } + + serialize(): Buffer { + return this.makerTrg.toBuffer(); + } + + static deserialize(data: Uint8Array): HxroAdditionalRespondData { + const makerTrg = new PublicKey(data); + return new HxroAdditionalRespondData(makerTrg); + } +} + +export class HxroContextHelper { + public creatorTrgData: CvgCache; + public counterpartyTrgData: CvgCache; + public operatorTrg: CvgCache; + + private constructor( + private cvg: Convergence, + public manifest: any, + public mpg: any, + private printTrade: HxroPrintTrade, + private response: PrintTradeResponse, + private firstToPrepare: AuthoritySide + ) { + this.creatorTrgData = useCache( + async () => await this.manifest.getTRG(this.getCreatorTrg()) + ); + this.counterpartyTrgData = useCache( + async () => await this.manifest.getTRG(this.getCounterpartyTrg()) + ); + this.operatorTrg = useCache(async () => { + const operatorTrgs = await this.manifest.getTRGsOfOwner( + this.cvg.hxro().pdas().operator() + ); + const { pubkey } = operatorTrgs[0]; + return pubkey; + }); + } + + static async create( + cvg: Convergence, + printTrade: HxroPrintTrade, + response: PrintTradeResponse, + firstToPrepare: AuthoritySide + ) { + const manifest = await hxroManifestCache.get(cvg); + const mpg = await fetchValidHxroMpg(cvg, manifest); + + return new HxroContextHelper( + cvg, + manifest, + mpg, + printTrade, + response, + firstToPrepare + ); + } + + getTakerTrg() { + return this.printTrade.takerTrg; + } + + getMakerTrg() { + return HxroAdditionalRespondData.deserialize(this.response.additionalData) + .makerTrg; + } + + getCreatorTrg() { + return this.firstToPrepare === 'taker' + ? this.getTakerTrg() + : this.getMakerTrg(); + } + + getCounterpartyTrg() { + return this.firstToPrepare === 'taker' + ? this.getMakerTrg() + : this.getTakerTrg(); + } + + getPrintTrade() { + const [result] = PublicKey.findProgramAddressSync( + [ + Buffer.from('print_trade'), + this.getCreatorTrg().toBuffer(), + this.getCounterpartyTrg().toBuffer(), + this.response.address.toBuffer(), + ], + this.getDexProgramId() + ); + + return result; + } + + getDexProgramId() { + return this.manifest.fields.dexProgram.programId; + } + + getRiskAndFeeSigner() { + return dexterity.Manifest.GetRiskAndFeeSigner(this.mpg.pubkey); + } + + getTrgBySide(side: AuthoritySide) { + if (side === 'taker') { + return this.getTakerTrg(); + } + + return this.getMakerTrg(); + } + + getTrgDataBySide(side: AuthoritySide) { + const isFirstToPrepare = side === this.firstToPrepare; + + if (isFirstToPrepare) { + return this.creatorTrgData; + } + + return this.counterpartyTrgData; + } +} diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/program.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/program.ts new file mode 100644 index 000000000..d64705f04 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/program.ts @@ -0,0 +1,38 @@ +import { PROGRAM_ID as HXRO_PRINT_TRADE_PROVIDER_PROGRAM_ID } from '@convergence-rfq/hxro-print-trade-provider'; +import { + Program as AnchorProgram, + AnchorProvider, + Wallet, +} from '@coral-xyz/anchor'; +import { Keypair } from '@solana/web3.js'; +import { Convergence } from '@/Convergence'; +import { Program } from '@/types'; +import { GpaBuilder, NoopWallet } from '@/utils'; + +export const hxroPrintTradeProviderProgram: Program = { + name: 'HxroPrintTradeProviderProgram', + address: HXRO_PRINT_TRADE_PROVIDER_PROGRAM_ID, + gpaResolver: (convergence: Convergence) => { + return new GpaBuilder(convergence, HXRO_PRINT_TRADE_PROVIDER_PROGRAM_ID); + }, +}; + +export const getHxroProgramFromIDL = async ( + cvg: Convergence, + hxroManifest: any +) => { + const idl = await import('./dex.json'); + // @ts-ignore + const RISK_IDL: Idl = idl; + + const provider = new AnchorProvider( + cvg.connection, + new NoopWallet(Keypair.generate().publicKey) as Wallet, + {} + ); + return new AnchorProgram( + RISK_IDL, + hxroManifest.fields.dexProgram.programId, + provider + ); +}; diff --git a/packages/js/src/plugins/hxroPrintTradeProviderModule/types.ts b/packages/js/src/plugins/hxroPrintTradeProviderModule/types.ts new file mode 100644 index 000000000..7b6bc2298 --- /dev/null +++ b/packages/js/src/plugins/hxroPrintTradeProviderModule/types.ts @@ -0,0 +1,40 @@ +import { PublicKey } from '@solana/web3.js'; +import { OptionType } from '@convergence-rfq/risk-engine'; +import { LegSide } from '../rfqModule'; +import { Fraction } from '@/types'; + +export type HxroLegInput = { + amount: number; + side: LegSide; + productInfo: HxroProductInfo; +}; + +type HxroCommonProductInfo = { + productIndex: number; + // Can be missing in a case when parsed from a leg but the data haven't been extended with hxro product data + productAddress?: PublicKey; + baseAssetIndex: number; +}; +export type HxroOptionInfo = HxroCommonProductInfo & { + instrumentType: 'option'; + optionType: OptionType; + strikePrice: Fraction; + expirationTimestamp: number; +}; +export type HxroTermFutureInfo = HxroCommonProductInfo & { + instrumentType: 'term-future'; + // Can be missing in a case when parsed from a leg but the data haven't been extended with hxro product data + expirationTimestamp?: number; +}; +export type HxroPerpFutureInfo = HxroCommonProductInfo & { + instrumentType: 'perp-future'; +}; + +export type HxroProductInfo = + | HxroOptionInfo + | HxroTermFutureInfo + | HxroPerpFutureInfo; + +export type WithPubkey = T & { + publicKey: PublicKey; +}; diff --git a/packages/js/src/plugins/index.ts b/packages/js/src/plugins/index.ts index b0ec26b85..641a337fd 100644 --- a/packages/js/src/plugins/index.ts +++ b/packages/js/src/plugins/index.ts @@ -18,4 +18,7 @@ export * from './protocolModule'; export * from './systemModule'; export * from './tokenModule'; export * from './accountModule'; +export * from './printTradeModule'; +export * from './hxroPrintTradeProviderModule'; export * from './whitelistModule'; +export * from './vaultOperatorModule'; diff --git a/packages/js/src/plugins/instrumentModule/InstrumentPdasClient.ts b/packages/js/src/plugins/instrumentModule/InstrumentPdasClient.ts index 8f36a8f70..6a4514d00 100644 --- a/packages/js/src/plugins/instrumentModule/InstrumentPdasClient.ts +++ b/packages/js/src/plugins/instrumentModule/InstrumentPdasClient.ts @@ -1,6 +1,6 @@ import { Buffer } from 'buffer'; -import { Rfq } from '../rfqModule'; +import { EscrowRfq } from '../rfqModule'; import type { Convergence } from '../../Convergence'; import { Pda, PublicKey } from '../../types'; @@ -40,7 +40,7 @@ type InstrumentEscrowInput = { index: number; /** The Rfq Model. */ - rfqModel: Rfq; + rfqModel: EscrowRfq; }; type QuoteEscrowInput = { diff --git a/packages/js/src/plugins/instrumentModule/methods.ts b/packages/js/src/plugins/instrumentModule/methods.ts index 78fe794c2..f122839cc 100644 --- a/packages/js/src/plugins/instrumentModule/methods.ts +++ b/packages/js/src/plugins/instrumentModule/methods.ts @@ -1,39 +1,37 @@ import { ApiLeg, QuoteAsset, legBeet } from '@convergence-rfq/rfq'; -import { AccountMeta } from '@solana/web3.js'; +import { AccountMeta, PublicKey } from '@solana/web3.js'; import { createSerializerFromFixableBeetArgsStruct } from '../../types'; import { addDecimals } from '../../utils/conversions'; import { toSolitaLegSide } from '../rfqModule/models/LegSide'; -import { PsyoptionsEuropeanInstrument } from '../psyoptionsEuropeanInstrumentModule'; -import { PsyoptionsAmericanInstrument } from '../psyoptionsAmericanInstrumentModule'; -import { SpotLegInstrument } from '../spotInstrumentModule'; +import { Protocol } from '../protocolModule'; import { LegInstrument, QuoteInstrument } from './types'; import { Convergence } from '@/Convergence'; -export function toLeg(legInstrument: LegInstrument): ApiLeg { +export function instrumentToSolitaLeg(legInstrument: LegInstrument): ApiLeg { return { - instrumentProgram: legInstrument.getProgramId(), + settlementTypeMetadata: { + __kind: 'Instrument', + instrumentIndex: legInstrument.getInstrumentIndex(), + }, baseAssetIndex: legInstrument.getBaseAssetIndex(), - instrumentData: legInstrument.serializeInstrumentData(), - instrumentAmount: addDecimals( - legInstrument.getAmount(), - legInstrument.getDecimals() - ), - instrumentDecimals: legInstrument.getDecimals(), + data: legInstrument.serializeInstrumentData(), + amount: addDecimals(legInstrument.getAmount(), legInstrument.getDecimals()), + amountDecimals: legInstrument.getDecimals(), side: toSolitaLegSide(legInstrument.getSide()), }; } -export function serializeAsLeg(legInstrument: LegInstrument) { +export function serializeInstrumentAsSolitaLeg(legInstrument: LegInstrument) { const legSerializer = createSerializerFromFixableBeetArgsStruct(legBeet); return legSerializer.serialize({ - ...toLeg(legInstrument), + ...instrumentToSolitaLeg(legInstrument), reserved: new Array(64).fill(0), }); } export function getSerializedLegLength(legInstrument: LegInstrument) { - return serializeAsLeg(legInstrument).length; + return serializeInstrumentAsSolitaLeg(legInstrument).length; } export function getProgramAccount(legInstrument: LegInstrument): AccountMeta { @@ -52,38 +50,37 @@ export function getValidationAccounts( ); } -export function toQuote(legInstrument: QuoteInstrument): QuoteAsset { +export function instrumentToQuote(legInstrument: QuoteInstrument): QuoteAsset { return { - instrumentProgram: legInstrument.getProgramId(), - instrumentData: legInstrument.serializeInstrumentData(), - instrumentDecimals: legInstrument.getDecimals(), + settlementTypeMetadata: { + __kind: 'Instrument', + instrumentIndex: legInstrument.getInstrumentIndex(), + }, + data: legInstrument.serializeInstrumentData(), + decimals: legInstrument.getDecimals(), }; } -//TODO: refactor this method to use instrument interface in the future -export const legToBaseAssetMint = async ( +export const legToBaseAssetMint = ( convergence: Convergence, leg: LegInstrument ) => { - if (leg instanceof PsyoptionsEuropeanInstrument) { - const euroMetaOptionMint = await convergence.tokens().findMintByAddress({ - address: leg.optionMint, - }); - - return euroMetaOptionMint; - } else if (leg instanceof PsyoptionsAmericanInstrument) { - const americanOptionMint = await convergence.tokens().findMintByAddress({ - address: leg.optionMint, - }); + return convergence.tokens().findMintByAddress({ + address: leg.getAssetMint(), + }); +}; - return americanOptionMint; - } else if (leg instanceof SpotLegInstrument) { - const mint = await convergence.tokens().findMintByAddress({ - address: leg.mintAddress, - }); +export const getInstrumentProgramIndex = ( + protocol: Protocol, + programAddress: PublicKey +) => { + const instrumentIndex = protocol.instruments.findIndex((instrument) => + instrument.programKey.equals(programAddress) + ); - return mint; + if (instrumentIndex === -1) { + throw Error('Cannot find spot instrument program in protocol!'); } - throw Error('Unsupported instrument!'); + return instrumentIndex; }; diff --git a/packages/js/src/plugins/instrumentModule/plugin.ts b/packages/js/src/plugins/instrumentModule/plugin.ts index 23c3a7f6a..4acc551b1 100644 --- a/packages/js/src/plugins/instrumentModule/plugin.ts +++ b/packages/js/src/plugins/instrumentModule/plugin.ts @@ -1,5 +1,6 @@ import { Leg as SolitaLeg } from '@convergence-rfq/rfq'; +import { Protocol } from '../protocolModule'; import { LegInstrument, LegInstrumentParser } from './types'; import type { Convergence } from '@/Convergence'; import { ConvergencePlugin, Program, PublicKey } from '@/types'; @@ -7,37 +8,44 @@ import { ConvergencePlugin, Program, PublicKey } from '@/types'; /** @group Plugins */ export const instrumentModule = (): ConvergencePlugin => ({ install(convergence: Convergence) { - const legInstrumentParsers: [PublicKey, LegInstrumentParser][] = []; + const legInstrumentParsers = new Map(); convergence.addLegInstrument = function ( - programAddress: PublicKey, + instrumentProgramAddress: PublicKey, factory: LegInstrumentParser ) { - const entry = legInstrumentParsers.find(([key]) => - programAddress.equals(key) - ); - - if (entry) { + if (legInstrumentParsers.has(instrumentProgramAddress.toBase58())) { throw new Error( - `Instrument for address ${programAddress.toString()} is already added!` + `Instrument for program ${instrumentProgramAddress} is already added!` ); } - legInstrumentParsers.push([programAddress, factory]); + legInstrumentParsers.set(instrumentProgramAddress.toBase58(), factory); }; - convergence.parseLegInstrument = function (leg: SolitaLeg) { - const factory = legInstrumentParsers.find(([key]) => - leg.instrumentProgram.equals(key) - )?.[1]; + convergence.parseLegInstrument = function ( + leg: SolitaLeg, + protocol: Protocol + ) { + if (leg.settlementTypeMetadata.__kind !== 'Instrument') { + throw new Error( + 'Leg is not settled as escrow, cannot parse as instrument' + ); + } + + const { instrumentIndex } = leg.settlementTypeMetadata; + const instrumentProgram = + protocol.instruments[instrumentIndex].programKey; + + const factory = legInstrumentParsers.get(instrumentProgram.toBase58()); if (!factory) { throw new Error( - `Missing leg instrument for address ${leg.instrumentProgram.toString()}` + `Missing leg instrument for program ${instrumentProgram}` ); } - return factory.parseFromLeg(convergence, leg); + return factory.parseFromLeg(convergence, leg, instrumentIndex); }; }, }); @@ -45,15 +53,16 @@ export const instrumentModule = (): ConvergencePlugin => ({ declare module '../../Convergence' { interface Convergence { addLegInstrument( - programAddress: PublicKey, + instrumentProgramAddress: PublicKey, factory: LegInstrumentParser ): void; - parseLegInstrument(leg: SolitaLeg): LegInstrument; + parseLegInstrument(leg: SolitaLeg, protocol: Protocol): LegInstrument; } } declare module '../programModule/ProgramClient' { interface ProgramClient { + // TODO remove getSpotInstrument(programs?: Program[]): Program; } } diff --git a/packages/js/src/plugins/instrumentModule/types.ts b/packages/js/src/plugins/instrumentModule/types.ts index e1ee536f5..9ed173cf8 100644 --- a/packages/js/src/plugins/instrumentModule/types.ts +++ b/packages/js/src/plugins/instrumentModule/types.ts @@ -6,20 +6,30 @@ import { Convergence } from '../../Convergence'; import { LegSide } from '../rfqModule/models/LegSide'; export interface LegInstrumentParser { - parseFromLeg(convergence: Convergence, leg: Leg): LegInstrument; + parseFromLeg( + convergence: Convergence, + leg: Leg, + instrumentIndex: number + ): LegInstrument; } export type CreateOptionInstrumentsResult = TransactionInstruction[]; export interface LegInstrument { + legType: 'escrow'; + + getInstrumentIndex: () => number; getProgramId: () => PublicKey; getBaseAssetIndex: () => BaseAssetIndex; + getAssetMint: () => PublicKey; getAmount: () => number; getDecimals: () => number; getSide: () => LegSide; serializeInstrumentData: () => Buffer; getValidationAccounts(): AccountMeta[]; - getPreparationsBeforeRfqCreation(): Promise; + getPreparationsBeforeRfqCreation( + taker: PublicKey + ): Promise; } // TODO add registration of quote instruments @@ -31,6 +41,7 @@ export interface LegInstrument { // } export interface QuoteInstrument { + getInstrumentIndex: () => number; getProgramId: () => PublicKey; getDecimals: () => number; serializeInstrumentData: () => Buffer; diff --git a/packages/js/src/plugins/printTradeModule/index.ts b/packages/js/src/plugins/printTradeModule/index.ts new file mode 100644 index 000000000..a30d9d93c --- /dev/null +++ b/packages/js/src/plugins/printTradeModule/index.ts @@ -0,0 +1,3 @@ +export * from './types'; +export * from './methods'; +export * from './plugin'; diff --git a/packages/js/src/plugins/printTradeModule/methods.ts b/packages/js/src/plugins/printTradeModule/methods.ts new file mode 100644 index 000000000..20ce83827 --- /dev/null +++ b/packages/js/src/plugins/printTradeModule/methods.ts @@ -0,0 +1,59 @@ +import { ApiLeg, QuoteAsset, legBeet } from '@convergence-rfq/rfq'; +import { AccountMeta } from '@solana/web3.js'; +import { toSolitaLegSide } from '../rfqModule/models'; +import { toNumberInstrumentType } from '../riskEngineModule/models'; +import { PrintTrade, PrintTradeLeg, PrintTradeQuote } from './types'; +import { addDecimals } from '@/utils'; +import { createSerializerFromFixableBeetArgsStruct } from '@/types'; + +export function printTradeToSolitaLeg(printTradeLeg: PrintTradeLeg): ApiLeg { + return { + settlementTypeMetadata: { + __kind: 'PrintTrade', + instrumentType: toNumberInstrumentType(printTradeLeg.getInstrumentType()), + }, + baseAssetIndex: printTradeLeg.getBaseAssetIndex(), + data: printTradeLeg.serializeInstrumentData(), + amount: addDecimals(printTradeLeg.getAmount(), printTradeLeg.getDecimals()), + amountDecimals: printTradeLeg.getDecimals(), + side: toSolitaLegSide(printTradeLeg.getSide()), + }; +} + +export function serializePrintTradeAsSolitaLeg(printTradeLeg: PrintTradeLeg) { + const legSerializer = createSerializerFromFixableBeetArgsStruct(legBeet); + return legSerializer.serialize({ + ...printTradeToSolitaLeg(printTradeLeg), + reserved: new Array(64).fill(0), + }); +} + +export function printTradetoSolitaQuote( + printTradeQuote: PrintTradeQuote +): QuoteAsset { + return { + settlementTypeMetadata: { + __kind: 'PrintTrade', + instrumentType: toNumberInstrumentType('spot'), + }, + data: printTradeQuote.serializeInstrumentData(), + decimals: printTradeQuote.getDecimals(), + }; +} + +export function getPrintTradeProgramAccount( + printTrade: PrintTrade +): AccountMeta { + return { + pubkey: printTrade.getPrintTradeProviderProgramId(), + isSigner: false, + isWritable: false, + }; +} + +export function prependWithProviderProgram( + printTrade: PrintTrade, + accounts: AccountMeta[] +): AccountMeta[] { + return [getPrintTradeProgramAccount(printTrade)].concat(accounts); +} diff --git a/packages/js/src/plugins/printTradeModule/plugin.ts b/packages/js/src/plugins/printTradeModule/plugin.ts new file mode 100644 index 000000000..2b1fb5f0d --- /dev/null +++ b/packages/js/src/plugins/printTradeModule/plugin.ts @@ -0,0 +1,59 @@ +import { + Leg as SolitaLeg, + QuoteAsset as SolitaQuoteAsset, +} from '@convergence-rfq/rfq'; +import { PrintTrade, PrintTradeParser } from './types'; +import type { Convergence } from '@/Convergence'; +import { ConvergencePlugin, PublicKey } from '@/types'; + +/** @group Plugins */ +export const printTradeModule = (): ConvergencePlugin => ({ + install(cvg: Convergence) { + const printTradeParsers = new Map(); + + cvg.addPrintTradeParser = function ( + printTradeProviderProgramId: PublicKey, + factory: PrintTradeParser + ) { + if (printTradeParsers.has(printTradeProviderProgramId.toBase58())) { + throw new Error( + `Print trade provider for program ${printTradeProviderProgramId} is already added!` + ); + } + + printTradeParsers.set(printTradeProviderProgramId.toBase58(), factory); + }; + + cvg.parsePrintTrade = function ( + printTradeProviderProgramId: PublicKey, + legs: SolitaLeg[], + quoteAsset: SolitaQuoteAsset + ) { + const factory = printTradeParsers.get( + printTradeProviderProgramId.toBase58() + ); + + if (!factory) { + throw new Error( + `Missing print trade provider for program ${printTradeProviderProgramId}` + ); + } + + return factory.parsePrintTrade(cvg, legs, quoteAsset); + }; + }, +}); + +declare module '../../Convergence' { + interface Convergence { + addPrintTradeParser( + printTradeProviderProgramId: PublicKey, + factory: PrintTradeParser + ): void; + parsePrintTrade( + printTradeProviderProgramId: PublicKey, + legs: SolitaLeg[], + quoteAsset: SolitaQuoteAsset + ): PrintTrade; + } +} diff --git a/packages/js/src/plugins/printTradeModule/types.ts b/packages/js/src/plugins/printTradeModule/types.ts new file mode 100644 index 000000000..4fc6585f7 --- /dev/null +++ b/packages/js/src/plugins/printTradeModule/types.ts @@ -0,0 +1,79 @@ +import { AccountMeta, PublicKey } from '@solana/web3.js'; +import { + BaseAssetIndex, + Leg as SolitaLeg, + QuoteAsset as SolitaQuoteAsset, +} from '@convergence-rfq/rfq'; +import { InstrumentType } from '../riskEngineModule'; +import { + LegSide, + AuthoritySide, + PrintTradeResponse, + PrintTradeRfq, +} from '../rfqModule'; +import { HxroContextHelper } from '../hxroPrintTradeProviderModule'; +import { Convergence } from '@/Convergence'; +import { TransactionBuilder, TransactionBuilderOptions } from '@/utils'; + +export interface PrintTrade { + getPrintTradeProviderProgramId: () => PublicKey; + getLegs: () => PrintTradeLeg[]; + getQuote: () => PrintTradeQuote; + getValidationAccounts: () => Promise; + getSettlementPreparations: ( + rfq: PrintTradeRfq, + response: PrintTradeResponse, + side: AuthoritySide, + options: TransactionBuilderOptions + ) => Promise<{ accounts: AccountMeta[]; builders: TransactionBuilder[] }>; + getHxroContextHelper: ( + cvg: Convergence, + response: PrintTradeResponse, + firstToPrepare: AuthoritySide + ) => Promise; + getSettlementAccounts: ( + rfq: PrintTradeRfq, + response: PrintTradeResponse + ) => Promise; + getRevertPreparations: ( + rfq: PrintTradeRfq, + response: PrintTradeResponse, + side: AuthoritySide, + options: TransactionBuilderOptions + ) => Promise<{ accounts: AccountMeta[]; postBuilders: TransactionBuilder[] }>; + getCleanUpAccounts: ( + rfq: PrintTradeRfq, + response: PrintTradeResponse + ) => Promise; + getValidateResponseAccounts: ( + additionalData: AdditionalResponseData | undefined + ) => Promise; +} + +export interface PrintTradeLeg { + legType: 'printTrade'; + + getInstrumentType: () => InstrumentType; + getBaseAssetIndex: () => BaseAssetIndex; + getAmount: () => number; + getDecimals: () => number; + getSide: () => LegSide; + serializeInstrumentData: () => Buffer; +} + +export interface PrintTradeQuote { + getDecimals: () => number; + serializeInstrumentData: () => Buffer; +} + +export interface PrintTradeParser { + parsePrintTrade( + cvg: Convergence, + legs: SolitaLeg[], + quote: SolitaQuoteAsset + ): PrintTrade; +} + +export abstract class AdditionalResponseData { + abstract serialize(): Buffer; +} diff --git a/packages/js/src/plugins/protocolModule/ProtocolClient.ts b/packages/js/src/plugins/protocolModule/ProtocolClient.ts index 2d777b537..f09f1e060 100644 --- a/packages/js/src/plugins/protocolModule/ProtocolClient.ts +++ b/packages/js/src/plugins/protocolModule/ProtocolClient.ts @@ -19,6 +19,12 @@ import { getRegisteredMintsOperation, closeProtocolOperation, CloseProtocolInput, + AddPrintTradeProviderInput, + addPrintTradeProviderOperation, + ChangeBaseAssetParametersInput, + changeBaseAssetParametersOperation, + AddUserAssetInput, + addUserAssetOperation, } from './operations'; import { ProtocolPdasClient } from './ProtocolPdasClient'; import { OperationOptions } from '@/types'; @@ -72,6 +78,16 @@ export class ProtocolClient { .execute(addInstrumentOperation(input), options); } + /** {@inheritDoc addPrintTradeProviderOperation} */ + addPrintTradeProvider( + input: AddPrintTradeProviderInput, + options?: OperationOptions + ) { + return this.convergence + .operations() + .execute(addPrintTradeProviderOperation(input), options); + } + /** {@inheritDoc getProtocolOperation} */ get(input?: GetProtocolInput, options?: OperationOptions) { return this.convergence @@ -92,6 +108,16 @@ export class ProtocolClient { .execute(addBaseAssetOperation(input), options); } + /** {@inheritDoc changeBaseAssetParametersOperation} */ + changeBaseAssetParameters( + input: ChangeBaseAssetParametersInput, + options?: OperationOptions + ) { + return this.convergence + .operations() + .execute(changeBaseAssetParametersOperation(input), options); + } + /** {@inheritDoc registerMintOperation} */ registerMint(input: RegisterMintInput, options?: OperationOptions) { return this.convergence @@ -128,4 +154,11 @@ export class ProtocolClient { .operations() .execute(findBaseAssetByAddressOperation(input), options); } + + /** {@inheritDoc addUserAssetOperation} */ + addUserAsset(input: AddUserAssetInput, options?: OperationOptions) { + return this.convergence + .operations() + .execute(addUserAssetOperation(input), options); + } } diff --git a/packages/js/src/plugins/protocolModule/ProtocolPdasClient.ts b/packages/js/src/plugins/protocolModule/ProtocolPdasClient.ts index 74f8ae8be..e53e8baad 100644 --- a/packages/js/src/plugins/protocolModule/ProtocolPdasClient.ts +++ b/packages/js/src/plugins/protocolModule/ProtocolPdasClient.ts @@ -1,7 +1,7 @@ import { Buffer } from 'buffer'; import type { Convergence } from '../../Convergence'; -import { Pda, Program } from '../../types'; +import { Pda, Program, PublicKey } from '../../types'; function toLittleEndian(value: number, bytes: number) { const buf = Buffer.allocUnsafe(bytes); @@ -34,6 +34,15 @@ export class ProtocolPdasClient { ]); } + /** Finds the PDA of a given mint. */ + mintInfo({ mint }: MintInfoInput): Pda { + const programId = this.programId(); + return Pda.find(programId, [ + Buffer.from('mint_info', 'utf8'), + mint.toBuffer(), + ]); + } + private programId(programs?: Program[]) { return this.convergence.programs().getRfq(programs).address; } @@ -43,3 +52,11 @@ type BaseAssetInput = { /** The base asset index. */ index: number; }; + +type MintInfoInput = { + /** The address of the mint account. */ + mint: PublicKey; + + /** An optional set of programs that override the registered ones. */ + programs?: Program[]; +}; diff --git a/packages/js/src/plugins/protocolModule/helpers.ts b/packages/js/src/plugins/protocolModule/helpers.ts new file mode 100644 index 000000000..3f1629118 --- /dev/null +++ b/packages/js/src/plugins/protocolModule/helpers.ts @@ -0,0 +1,64 @@ +import { COption } from '@convergence-rfq/beet'; +import { CustomOptionalF64, CustomOptionalPubkey } from '@convergence-rfq/rfq'; +import { PublicKey } from '@solana/web3.js'; +import { baseAssetsCache } from './cache'; +import { Convergence } from '@/Convergence'; + +export const toCustomOptionalF64 = ( + input: COption +): CustomOptionalF64 => { + if (input !== null) { + return { + __kind: 'Some', + value: input, + }; + } + return { + __kind: 'None', + }; +}; + +export const toCustomOptionalPubkey = ( + input: COption +): CustomOptionalPubkey => { + if (input !== null) { + return { + __kind: 'Some', + value: input, + }; + } + return { + __kind: 'None', + }; +}; + +export const findVacantBaseAssetIndex = async (cvg: Convergence) => { + await baseAssetsCache.clear(); // clear the cache to use up-to-date base assets + + const getRandomNumber = (min: number, max: number) => { + const minCeiled = Math.ceil(min); + const maxFloored = Math.floor(max); + return Math.floor(Math.random() * (maxFloored - minCeiled) + minCeiled); // The maximum is exclusive and the minimum is inclusive + }; + let elementsToSkip = getRandomNumber(0, 100); + + const existingBaseAssets = await cvg.protocol().getBaseAssets(); + const existing = existingBaseAssets + .map((el) => el.index) + .sort((a, b) => a - b); + + let nextExistingIndex = 0; + for (let i = 0; i < 2 ** 16; i++) { + const nextExisting = + nextExistingIndex < existing.length ? existing[nextExistingIndex] : null; + if (i === nextExisting) { + nextExistingIndex++; + } else if (elementsToSkip > 0) { + elementsToSkip--; + } else { + return i; + } + } + + throw new Error('Failed to find a vacant base asset index'); +}; diff --git a/packages/js/src/plugins/protocolModule/models/BaseAsset.ts b/packages/js/src/plugins/protocolModule/models/BaseAsset.ts index a2d4b4caa..9d39f61ed 100644 --- a/packages/js/src/plugins/protocolModule/models/BaseAsset.ts +++ b/packages/js/src/plugins/protocolModule/models/BaseAsset.ts @@ -4,7 +4,6 @@ import { RiskCategory as SolitaRiskCategory, OracleSource as SolitaOracleSource, } from '@convergence-rfq/rfq'; -import { COption } from '@convergence-rfq/beet'; import { BaseAssetAccount } from '../accounts'; import { assert } from '../../../utils/assert'; @@ -19,10 +18,23 @@ export type RiskCategory = | 'custom-2' | 'custom-3'; -export type PriceOracle = { - source: 'switchboard' | 'pyth' | 'in-place'; - address?: PublicKey; - price?: number; +export const isRiskCategory = (value: string): value is RiskCategory => { + return [ + 'very-low', + 'low', + 'medium', + 'high', + 'very-high', + 'custom-1', + 'custom-2', + 'custom-3', + ].includes(value); +}; + +export type OracleSource = 'switchboard' | 'pyth' | 'in-place'; + +export const isOracleSource = (value: string): value is OracleSource => { + return ['switchboard', 'pyth', 'in-place'].includes(value); }; /** @@ -50,8 +62,20 @@ export type BaseAsset = { /** Is base asset enabled or disabled. */ readonly enabled: boolean; - /** The price oracle for the base asset. */ - readonly priceOracle: PriceOracle; + /** The price oracle source for the base asset. */ + readonly oracleSource: OracleSource; + + /** The switchboard oracle. */ + readonly switchboardOracle?: PublicKey; + + /** The pyth oracle. */ + readonly pythOracle?: PublicKey; + + /** The in-place price. */ + readonly inPlacePrice?: number; + + /** Is strict asset. */ + readonly strict: boolean; /** The ticker for the base asset. */ readonly ticker: string; @@ -97,70 +121,33 @@ export const toRiskCategory = ( } }; -/** @group Model Helpers */ -export const toPriceOracle = ( - solitaOracleSource: SolitaOracleSource, - switchboardOracle: PublicKey, - pythOracle: PublicKey, - inPlacePrice: number -): PriceOracle => { - switch (solitaOracleSource) { +export const toOracleSource = ( + oracleSource: SolitaOracleSource +): OracleSource => { + switch (oracleSource) { case SolitaOracleSource.Switchboard: - return { - source: 'switchboard', - address: switchboardOracle, - }; + return 'switchboard'; case SolitaOracleSource.Pyth: - return { - source: 'pyth', - address: pythOracle, - }; + return 'pyth'; case SolitaOracleSource.InPlace: - return { - source: 'in-place', - price: inPlacePrice, - }; + return 'in-place'; default: - throw new Error(`Unsupported price oracle: ${solitaOracleSource}`); + throw new Error(`Unsupported oracle source: ${oracleSource}`); } }; -/** @group Model Helpers */ -export const toSolitaPriceOracle = ( - priceOracle: PriceOracle -): { - oracleSource: SolitaOracleSource; - pythOracle: COption; - switchboardOracle: COption; - inPlacePrice: COption; -} => { - switch (priceOracle.source) { +export const toSolitaOracleSource = ( + oracleSource: OracleSource +): SolitaOracleSource => { + switch (oracleSource) { case 'switchboard': - if (!priceOracle.address) throw new Error('Missing oracle address'); - return { - oracleSource: SolitaOracleSource.Switchboard, - switchboardOracle: priceOracle.address, - pythOracle: null, - inPlacePrice: null, - }; + return SolitaOracleSource.Switchboard; case 'pyth': - if (!priceOracle.address) throw new Error('Missing oracle address'); - return { - oracleSource: SolitaOracleSource.Pyth, - switchboardOracle: null, - pythOracle: priceOracle.address, - inPlacePrice: null, - }; + return SolitaOracleSource.Pyth; case 'in-place': - if (!priceOracle.price) throw new Error('Missing oracle price'); - return { - oracleSource: SolitaOracleSource.InPlace, - switchboardOracle: null, - pythOracle: null, - inPlacePrice: priceOracle.price, - }; + return SolitaOracleSource.InPlace; default: - throw new Error(`Unsupported price oracle: ${priceOracle}`); + throw new Error(`Unsupported oracle source: ${oracleSource}`); } }; @@ -195,11 +182,15 @@ export const toBaseAsset = (account: BaseAssetAccount): BaseAsset => ({ index: toBaseAssetIndex(account.data.index), enabled: account.data.enabled, riskCategory: toRiskCategory(account.data.riskCategory), - priceOracle: toPriceOracle( - account.data.oracleSource, - account.data.switchboardOracle, - account.data.pythOracle, - account.data.inPlacePrice - ), + oracleSource: toOracleSource(account.data.oracleSource), + switchboardOracle: !account.data.switchboardOracle.equals(PublicKey.default) + ? account.data.switchboardOracle + : undefined, + pythOracle: !account.data.pythOracle.equals(PublicKey.default) + ? account.data.pythOracle + : undefined, + inPlacePrice: + account.data.inPlacePrice !== 0 ? account.data.inPlacePrice : undefined, + strict: !account.data.nonStrict, ticker: account.data.ticker, }); diff --git a/packages/js/src/plugins/protocolModule/models/Protocol.ts b/packages/js/src/plugins/protocolModule/models/Protocol.ts index f43a6039e..0d5942396 100644 --- a/packages/js/src/plugins/protocolModule/models/Protocol.ts +++ b/packages/js/src/plugins/protocolModule/models/Protocol.ts @@ -1,8 +1,13 @@ import { PublicKey } from '@solana/web3.js'; -import { FeeParameters, Instrument } from '@convergence-rfq/rfq'; +import { + FeeParameters, + Instrument, + PrintTradeProvider, +} from '@convergence-rfq/rfq'; import { ProtocolAccount } from '../accounts'; import { assert } from '../../../utils/assert'; +import { removeDecimals } from '@/utils/conversions'; /** * This model captures all the relevant information about an RFQ @@ -29,6 +34,9 @@ export type Protocol = { /** The default fees for the protocol */ readonly defaultFees: FeeParameters; + /** Sol fee to add a user asset */ + readonly assetAddFee: number; + /** The address of the risk engine */ readonly riskEngine: PublicKey; @@ -37,6 +45,9 @@ export type Protocol = { /** The procotol instruments. */ readonly instruments: Instrument[]; + + /** The procotol instruments. */ + readonly printTradeProviders: PrintTradeProvider[]; }; /** @group Model Helpers */ @@ -56,7 +67,9 @@ export const toProtocol = (account: ProtocolAccount): Protocol => ({ active: account.data.active, settleFees: account.data.settleFees, defaultFees: account.data.defaultFees, + assetAddFee: removeDecimals(account.data.assetAddFee, 9), riskEngine: account.data.riskEngine, collateralMint: account.data.collateralMint, instruments: account.data.instruments, + printTradeProviders: account.data.printTradeProviders, }); diff --git a/packages/js/src/plugins/protocolModule/operations/addBaseAsset.ts b/packages/js/src/plugins/protocolModule/operations/addBaseAsset.ts index 955315696..7e95780cb 100644 --- a/packages/js/src/plugins/protocolModule/operations/addBaseAsset.ts +++ b/packages/js/src/plugins/protocolModule/operations/addBaseAsset.ts @@ -3,10 +3,10 @@ import { PublicKey } from '@solana/web3.js'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; import { + OracleSource, RiskCategory, - PriceOracle, + toSolitaOracleSource, toSolitaRiskCategory, - toSolitaPriceOracle, } from '../models/BaseAsset'; import { Convergence } from '../../../Convergence'; import { @@ -21,6 +21,7 @@ import { TransactionBuilderOptions, } from '../../../utils/TransactionBuilder'; import { baseAssetsCache } from '../cache'; +import { findVacantBaseAssetIndex } from '../helpers'; const Key = 'AddBaseAssetOperation' as const; @@ -66,13 +67,19 @@ export type AddBaseAssetInput = { /** * The index of the BaseAsset. */ - index: number; + index?: number; ticker: string; - riskCategory: RiskCategory; + riskCategory?: RiskCategory; - priceOracle: PriceOracle; + oracleSource?: OracleSource; + + inPlacePrice?: number; + + pythOracle?: PublicKey; + + switchboardOracle?: PublicKey; }; /** @@ -82,6 +89,8 @@ export type AddBaseAssetInput = { export type AddBaseAssetOutput = { /** The blockchain response from sending and confirming the transaction. */ response: SendAndConfirmTransactionResponse; + + baseAssetIndex: number; }; /** @@ -92,19 +101,23 @@ export const addBaseAssetOperationHandler: OperationHandler => { scope.throwIfCanceled(); - const builder = addBaseAssetBuilder(convergence, operation.input, scope); + const { builder, baseAssetIndex } = await addBaseAssetBuilder( + cvg, + operation.input, + scope + ); const { response } = await builder.sendAndConfirm( - convergence, + cvg, scope.confirmOptions ); baseAssetsCache.clear(); - return { response }; + return { response, baseAssetIndex }; }, }; @@ -114,6 +127,11 @@ export const addBaseAssetOperationHandler: OperationHandler { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const rfqProgram = convergence.programs().getRfq(programs); - const protocolPda = convergence.protocol().pdas().protocol(); +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const rfqProgram = cvg.programs().getRfq(programs); + const protocolPda = cvg.protocol().pdas().protocol(); const { protocol = protocolPda, authority, - index, + index = await findVacantBaseAssetIndex(cvg), ticker, - riskCategory, - priceOracle, + riskCategory = 'low', + oracleSource = 'in-place', + inPlacePrice = null, + pythOracle = null, + switchboardOracle = null, } = params; - const baseAsset = convergence.protocol().pdas().baseAsset({ index }); - const { oracleSource, inPlacePrice, pythOracle, switchboardOracle } = - toSolitaPriceOracle(priceOracle); + const baseAsset = cvg.protocol().pdas().baseAsset({ index }); - return TransactionBuilder.make() + const builder = TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(cvg) .add({ instruction: createAddBaseAssetInstruction( { @@ -161,7 +181,7 @@ export const addBaseAssetBuilder = ( index: { value: index }, ticker, riskCategory: toSolitaRiskCategory(riskCategory), - oracleSource, + oracleSource: toSolitaOracleSource(oracleSource), inPlacePrice, pythOracle, switchboardOracle, @@ -171,4 +191,9 @@ export const addBaseAssetBuilder = ( signers: [authority], key: 'addBaseAsset', }); + + return { + builder, + baseAssetIndex: index, + }; }; diff --git a/packages/js/src/plugins/protocolModule/operations/addPrintTradeProvider.ts b/packages/js/src/plugins/protocolModule/operations/addPrintTradeProvider.ts new file mode 100644 index 000000000..734fc18d1 --- /dev/null +++ b/packages/js/src/plugins/protocolModule/operations/addPrintTradeProvider.ts @@ -0,0 +1,132 @@ +import { createAddPrintTradeProviderInstruction } from '@convergence-rfq/rfq'; +import { PublicKey } from '@solana/web3.js'; + +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { protocolCache } from '../cache'; + +const Key = 'AddPrintTradeProviderOperation' as const; + +/** + * @group Operations + * @category Constructors + */ +export const addPrintTradeProviderOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type AddPrintTradeProviderOperation = Operation< + typeof Key, + AddPrintTradeProviderInput, + AddPrintTradeProviderOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type AddPrintTradeProviderInput = { + /** + * The print trade provider program to add to the protocol. + */ + printTradeProviderProgram: PublicKey; + + /* + * If true, settlement could expire and be cancelled if both parties have prepared but haven't settled + */ + settlementCanExpire: boolean; + + validateResponseAccountAmount: number; +}; + +/** + * @group Operations + * @category Outputs + */ +export type AddPrintTradeProviderOutput = { + /** The blockchain response from sending and confirming the transaction. */ + response: SendAndConfirmTransactionResponse; +}; + +/** + * @group Operations + * @category Handlers + */ +export const addPrintTradeProviderOperationHandler: OperationHandler = + { + handle: async ( + operation: AddPrintTradeProviderOperation, + convergence: Convergence, + scope: OperationScope + ): Promise => { + scope.throwIfCanceled(); + + protocolCache.clear(); + + return addPrintTradeProviderBuilder( + convergence, + operation.input, + scope + ).sendAndConfirm(convergence, scope.confirmOptions); + }, + }; + +/** + * @group Transaction Builders + * @category Inputs + */ +export type AddPrintTradeProviderBuilderParams = AddPrintTradeProviderInput; + +/** + * @group Transaction Builders + * @category Constructors + */ +export const addPrintTradeProviderBuilder = ( + cvg: Convergence, + params: AddPrintTradeProviderBuilderParams, + options: TransactionBuilderOptions = {} +): TransactionBuilder => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const rfqProgram = cvg.programs().getRfq(programs); + const { + printTradeProviderProgram, + settlementCanExpire, + validateResponseAccountAmount, + } = params; + const authority = cvg.identity(); + + // Clear the protocol cache so that the protocol is reloaded + protocolCache.clear(); + + return TransactionBuilder.make() + .setFeePayer(payer) + .add({ + instruction: createAddPrintTradeProviderInstruction( + { + authority: authority.publicKey, + protocol: cvg.protocol().pdas().protocol(), + printTradeProviderProgram, + }, + { + settlementCanExpire, + validateResponseAccountAmount, + }, + rfqProgram.address + ), + signers: [authority], + key: 'addPrintTradeProvider', + }); +}; diff --git a/packages/js/src/plugins/protocolModule/operations/addUserAsset.ts b/packages/js/src/plugins/protocolModule/operations/addUserAsset.ts new file mode 100644 index 000000000..8a0e0f0ca --- /dev/null +++ b/packages/js/src/plugins/protocolModule/operations/addUserAsset.ts @@ -0,0 +1,160 @@ +import { createAddUserAssetInstruction } from '@convergence-rfq/rfq'; +import { PublicKey } from '@solana/web3.js'; + +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { baseAssetsCache, registeredMintsCache } from '../cache'; +import { findVacantBaseAssetIndex } from '../helpers'; + +const Key = 'AddUserAssetOperation' as const; + +export const addUserAssetOperation = useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type AddUserAssetOperation = Operation< + typeof Key, + AddUserAssetInput, + AddUserAssetOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type AddUserAssetInput = { + ticker: string; + + mint: PublicKey; + + baseAssetIndex?: number; +}; + +/** + * @group Operations + * @category Outputs + */ +export type AddUserAssetOutput = { + /** The blockchain response from sending and confirming the transaction. */ + response: SendAndConfirmTransactionResponse; + + baseAssetIndex: number; +}; + +/** + * @group Operations + * @category Handlers + */ +export const addUserAssetOperationHandler: OperationHandler = + { + handle: async ( + operation: AddUserAssetOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + scope.throwIfCanceled(); + + const { builder, baseAssetIndex } = await addUserAssetBuilder( + cvg, + operation.input, + scope + ); + const { response } = await builder.sendAndConfirm( + cvg, + scope.confirmOptions + ); + baseAssetsCache.clear(); + registeredMintsCache.clear(); + + return { response, baseAssetIndex }; + }, + }; + +/** + * @group Transaction Builders + * @category Inputs + */ +export type AddUserAssetBuilderParams = AddUserAssetInput; + +export type AddUserAssetBuilderResult = { + builder: TransactionBuilder; + baseAssetIndex: number; +}; + +/** + * Adds an UserAsset + * + * ```ts + * const transactionBuilder = convergence + * .rfqs() + * .builders() + * .addUserAsset({ address }); + * ``` + * + * @group Transaction Builders + * @category Constructors + */ +export const addUserAssetBuilder = async ( + cvg: Convergence, + params: AddUserAssetBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const rfqProgram = cvg.programs().getRfq(programs); + const protocolPda = cvg.protocol().pdas().protocol(); + const protocol = await cvg.protocol().get(); + const { + ticker, + mint, + baseAssetIndex = await findVacantBaseAssetIndex(cvg), + } = params; + + const baseAsset = cvg.protocol().pdas().baseAsset({ index: baseAssetIndex }); + const mintInfo = cvg.protocol().pdas().mintInfo({ mint }); + + let mintRegistered = false; + try { + await cvg.protocol().findRegisteredMintByAddress({ address: mintInfo }); + mintRegistered = true; + } catch (e) {} + if (mintRegistered) { + throw new Error(`Mint ${mint.toString()} had been already registered`); + } + + const builder = TransactionBuilder.make() + .setFeePayer(payer) + .addTxPriorityFeeIx(cvg) + .add({ + instruction: createAddUserAssetInstruction( + { + creator: cvg.identity().publicKey, + authority: protocol.authority, + protocol: protocolPda, + baseAsset, + mintInfo, + mint, + }, + { + index: { value: baseAssetIndex }, + ticker, + }, + rfqProgram.address + ), + signers: [cvg.identity()], + key: 'addUserAsset', + }); + + return { builder, baseAssetIndex }; +}; diff --git a/packages/js/src/plugins/protocolModule/operations/changeBaseAssetParameters.ts b/packages/js/src/plugins/protocolModule/operations/changeBaseAssetParameters.ts new file mode 100644 index 000000000..3b92a2f82 --- /dev/null +++ b/packages/js/src/plugins/protocolModule/operations/changeBaseAssetParameters.ts @@ -0,0 +1,178 @@ +import { createChangeBaseAssetParametersInstruction } from '@convergence-rfq/rfq'; +import { PublicKey } from '@solana/web3.js'; + +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; +import { + RiskCategory, + toSolitaRiskCategory, + OracleSource, + toSolitaOracleSource, +} from '../models/BaseAsset'; +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { baseAssetsCache } from '../cache'; + +const Key = 'changeBaseAssetParametersOperation' as const; + +/** + * @group Operations + * @category Constructors + */ +export const changeBaseAssetParametersOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type ChangeBaseAssetParametersOperation = Operation< + typeof Key, + ChangeBaseAssetParametersInput, + ChangeBaseAssetParametersOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type ChangeBaseAssetParametersInput = { + index: number; + + enabled?: boolean; + + riskCategory?: RiskCategory; + + /** + * If this parameter is missing, oracle source would be unchanged + * If a null value is passed, unset it + */ + oracleSource?: OracleSource; + + /** + * If this parameter is missing, switchboard oracle would be unchanged + * If a null value is passed, unset it + */ + switchboardOracle?: PublicKey | null; + + /** + * If this parameter is missing, pyth oracle would be unchanged + * If a null value is passed, unset it + */ + pythOracle?: PublicKey | null; + + /** + * If this parameter is missing, in place price would be unchanged + * If a null value is passed, unset it + */ + inPlacePrice?: number | null; + + strict?: boolean; +}; + +/** + * @group Operations + * @category Outputs + */ +export type ChangeBaseAssetParametersOutput = { + /** The blockchain response from sending and confirming the transaction. */ + response: SendAndConfirmTransactionResponse; +}; + +/** + * @group Operations + * @category Handlers + */ +export const changeBaseAssetParametersOperationHandler: OperationHandler = + { + handle: async ( + operation: ChangeBaseAssetParametersOperation, + convergence: Convergence, + scope: OperationScope + ): Promise => { + scope.throwIfCanceled(); + + const builder = changeBaseAssetParametersBuilder( + convergence, + operation.input, + scope + ); + const { response } = await builder.sendAndConfirm( + convergence, + scope.confirmOptions + ); + baseAssetsCache.clear(); + + return { response }; + }, + }; + +/** + * @group Transaction Builders + * @category Inputs + */ +export type ChangeBaseAssetParametersBuilderParams = + ChangeBaseAssetParametersInput; + +/** + * @group Transaction Builders + * @category Constructors + */ +export const changeBaseAssetParametersBuilder = ( + cvg: Convergence, + params: ChangeBaseAssetParametersBuilderParams, + options: TransactionBuilderOptions = {} +): TransactionBuilder => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const rfqProgram = cvg.programs().getRfq(programs); + const protocolPda = cvg.protocol().pdas().protocol(); + const { + index, + enabled = null, + riskCategory = null, + oracleSource = null, + switchboardOracle, + pythOracle, + inPlacePrice, + strict = null, + } = params; + + const baseAsset = cvg.protocol().pdas().baseAsset({ index }); + + const wrapInCustomOption = (value: T | undefined) => + value !== undefined + ? { __kind: 'Some' as const, value } + : { __kind: 'None' as const }; + + return TransactionBuilder.make() + .setFeePayer(payer) + .add({ + instruction: createChangeBaseAssetParametersInstruction( + { + authority: cvg.identity().publicKey, + protocol: protocolPda, + baseAsset, + }, + { + riskCategory: riskCategory && toSolitaRiskCategory(riskCategory), + enabled, + oracleSource: oracleSource && toSolitaOracleSource(oracleSource), + switchboardOracle: wrapInCustomOption(switchboardOracle), + pythOracle: wrapInCustomOption(pythOracle), + inPlacePrice: wrapInCustomOption(inPlacePrice), + strict, + }, + rfqProgram.address + ), + signers: [cvg.identity()], + key: 'changeBaseAssetParameters', + }); +}; diff --git a/packages/js/src/plugins/protocolModule/operations/index.ts b/packages/js/src/plugins/protocolModule/operations/index.ts index 2556b5bb9..4e96ed02d 100644 --- a/packages/js/src/plugins/protocolModule/operations/index.ts +++ b/packages/js/src/plugins/protocolModule/operations/index.ts @@ -1,6 +1,8 @@ export * from './initializeProtocol'; export * from './getProtocol'; export * from './addInstrument'; +export * from './changeBaseAssetParameters'; +export * from './addPrintTradeProvider'; export * from './registerMint'; export * from './addBaseAsset'; export * from './getBaseAssets'; @@ -8,3 +10,4 @@ export * from './getRegisteredMints'; export * from './findRegisteredMintByAddress'; export * from './findBaseAssetByAddress'; export * from './closeProtocol'; +export * from './addUserAsset'; diff --git a/packages/js/src/plugins/protocolModule/operations/initializeProtocol.ts b/packages/js/src/plugins/protocolModule/operations/initializeProtocol.ts index cd97aa341..151a38ca0 100644 --- a/packages/js/src/plugins/protocolModule/operations/initializeProtocol.ts +++ b/packages/js/src/plugins/protocolModule/operations/initializeProtocol.ts @@ -83,6 +83,11 @@ export type InitializeProtocolInput = { * The protocol settlement taker fee. */ settlementTakerFee?: number; + + /** + * The add user asset sol fee. + */ + addAssetFee?: number; }; /** @@ -183,6 +188,7 @@ export const createProtocolBuilder = async ( protocolTakerFee = 0, settlementTakerFee = 0, settlementMakerFee = 0, + addAssetFee = 0, } = params; const systemProgram = convergence.programs().getSystem(programs); @@ -214,6 +220,7 @@ export const createProtocolBuilder = async ( collateralMintTokenAccount.decimals ), }; + const solitaAddAssetFee = addDecimals(addAssetFee, 9); return TransactionBuilder.make() .setFeePayer(payer) @@ -229,6 +236,7 @@ export const createProtocolBuilder = async ( { settleFees, defaultFees, + assetAddFee: solitaAddAssetFee, }, rfqProgram.address ), diff --git a/packages/js/src/plugins/protocolModule/operations/registerMint.ts b/packages/js/src/plugins/protocolModule/operations/registerMint.ts index fdcf5979e..f4bbf5c22 100644 --- a/packages/js/src/plugins/protocolModule/operations/registerMint.ts +++ b/packages/js/src/plugins/protocolModule/operations/registerMint.ts @@ -156,7 +156,7 @@ export const registerMintBuilder = async ( const rfqProgram = convergence.programs().getRfq(); const protocol = convergence.protocol().pdas().protocol(); - const mintInfo = convergence.rfqs().pdas().mintInfo({ mint }); + const mintInfo = convergence.protocol().pdas().mintInfo({ mint }); let baseAsset: PublicKey; if (baseAssetIndex >= 0) { diff --git a/packages/js/src/plugins/protocolModule/plugin.ts b/packages/js/src/plugins/protocolModule/plugin.ts index 06126a27f..8b4aa742b 100644 --- a/packages/js/src/plugins/protocolModule/plugin.ts +++ b/packages/js/src/plugins/protocolModule/plugin.ts @@ -20,8 +20,13 @@ import { findBaseAssetByAddressOperationHandler, closeProtocolOperation, closeProtocolOperationHandler, + addPrintTradeProviderOperation, + addPrintTradeProviderOperationHandler, + changeBaseAssetParametersOperation, + changeBaseAssetParametersOperationHandler, + addUserAssetOperation, + addUserAssetOperationHandler, } from './operations'; -import { Protocol } from './models'; import { ConvergencePlugin } from '@/types'; import type { Convergence } from '@/Convergence'; @@ -35,7 +40,15 @@ export const protocolModule = (): ConvergencePlugin => ({ ); op.register(getProtocolOperation, getProtocolOperationHandler); op.register(addInstrumentOperation, addInstrumentOperationHandler); + op.register( + addPrintTradeProviderOperation, + addPrintTradeProviderOperationHandler + ); op.register(addBaseAssetOperation, addBaseAssetOperationHandler); + op.register( + changeBaseAssetParametersOperation, + changeBaseAssetParametersOperationHandler + ); op.register(registerMintOperation, registerMintOperationHandler); op.register(getBaseAssetsOperation, getBaseAssetsOperationHandler); op.register( @@ -51,7 +64,7 @@ export const protocolModule = (): ConvergencePlugin => ({ findBaseAssetByAddressOperationHandler ); op.register(closeProtocolOperation, closeProtocolOperationHandler); - + op.register(addUserAssetOperation, addUserAssetOperationHandler); convergence.protocol = function () { return new ProtocolClient(this); }; @@ -63,9 +76,3 @@ declare module '../../Convergence' { protocol(): ProtocolClient; } } - -declare module '../protocolModule/ProtocolClient' { - interface ProtocolClient { - getProtocol(): Protocol; - } -} diff --git a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/helpers.ts b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/helpers.ts index 6513fb5b0..4ee5c4400 100644 --- a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/helpers.ts +++ b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/helpers.ts @@ -4,10 +4,12 @@ import { PublicKey } from '@solana/web3.js'; import { Convergence } from '../../Convergence'; import { getOrCreateATAtxBuilder } from '../../utils/ata'; -import { CvgWallet } from '../../utils/Wallets'; +import { NoopWallet } from '../../utils/Wallets'; import { InstructionUniquenessTracker } from '../../utils/classes'; -import { PsyoptionsAmericanInstrument } from './types'; -import { createAmericanProgram } from './instrument'; +import { + PsyoptionsAmericanInstrument, + createAmericanProgram, +} from './instrument'; import { TransactionBuilder } from '@/utils/TransactionBuilder'; export type PrepareAmericanOptionsResult = { @@ -21,7 +23,7 @@ export const prepareAmericanOptions = async ( caller: PublicKey ): Promise => { const ixTracker = new InstructionUniquenessTracker([]); - const cvgWallet = new CvgWallet(convergence); + const cvgWallet = new NoopWallet(caller); const americanProgram = createAmericanProgram(convergence, cvgWallet); const response = await convergence .rfqs() @@ -48,7 +50,7 @@ export const prepareAmericanOptions = async ( continue; } - const optionMarket = await leg.getOptionMeta(); + const optionMarket = await leg.getOptionMeta(caller); const optionToken = await getOrCreateATAtxBuilder( convergence, optionMarket.optionMint, @@ -107,7 +109,7 @@ export const prepareAmericanOptions = async ( const mintTxBuilder = TransactionBuilder.make().setFeePayer( convergence.rpc().getDefaultFeePayer() ); - mintTxBuilder.add({ + mintTxBuilder.addTxPriorityFeeIx(convergence).add({ instruction: ixWithSigners.ix, signers: [convergence.identity()], }); diff --git a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/instrument.ts b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/instrument.ts index e6c7b4d70..66343b790 100644 --- a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/instrument.ts +++ b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/instrument.ts @@ -1,4 +1,4 @@ -import { Keypair, PublicKey, TransactionInstruction } from '@solana/web3.js'; +import { PublicKey, TransactionInstruction } from '@solana/web3.js'; import { Leg, BaseAssetIndex } from '@convergence-rfq/rfq'; import { OptionMarketWithKey } from '@mithraic-labs/psy-american'; import { OptionType } from '@mithraic-labs/tokenized-euros'; @@ -9,14 +9,16 @@ import * as psyoptionsAmerican from '@mithraic-labs/psy-american'; import BN from 'bn.js'; import { Mint } from '../tokenModule'; import { - CreateOptionInstrumentsResult, LegInstrument, + getInstrumentProgramIndex, + CreateOptionInstrumentsResult, } from '../instrumentModule'; import { addDecimals, removeDecimals } from '../../utils/conversions'; import { Convergence } from '../../Convergence'; import { createSerializerFromFixableBeetArgsStruct } from '../../types'; import { LegSide, fromSolitaLegSide } from '../rfqModule/models/LegSide'; -import { CvgWallet, NoopWallet } from '../../utils/Wallets'; +import { NoopWallet } from '../../utils/Wallets'; +import { PSYOPTIONS_AMERICAN_INSTRUMENT_PROGRAM_ID } from './types'; import { GetOrCreateATAtxBuilderReturnType, getOrCreateATAtxBuilder, @@ -52,6 +54,7 @@ export const psyoptionsAmericanInstrumentDataSerializer = export class PsyoptionsAmericanInstrument implements LegInstrument { static readonly decimals = 0; + legType: 'escrow'; constructor( readonly convergence: Convergence, @@ -64,17 +67,24 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { readonly optionMint: PublicKey, readonly optionMetaPubKey: PublicKey, readonly baseAssetIndex: BaseAssetIndex, + readonly instrumentIndex: number, readonly amount: number, readonly side: LegSide, readonly underlyingAssetMint?: PublicKey, readonly stableAssetMint?: PublicKey - ) {} + ) { + this.legType = 'escrow'; + } getBaseAssetIndex = () => this.baseAssetIndex; + getInstrumentIndex = () => this.instrumentIndex; + getAssetMint = () => this.optionMint; getAmount = () => this.amount; getDecimals = () => PsyoptionsAmericanInstrument.decimals; getSide = () => this.side; - async getPreparationsBeforeRfqCreation(): Promise { + async getPreparationsBeforeRfqCreation( + taker: PublicKey + ): Promise { if (!this.underlyingAssetMint) { throw new Error('Missing underlying asset mint'); } @@ -84,6 +94,7 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { const optionMarketIxs = await getPsyAmericanMarketIxs( this.convergence, + taker, this.underlyingAssetMint, this.underlyingAmountPerContractDecimals, this.underlyingAmountPerContract, @@ -97,6 +108,7 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { } static async create( + taker: PublicKey, convergence: Convergence, underlyingMint: Mint, stableMint: Mint, @@ -108,7 +120,7 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { expirationTimestamp: number ) { const mintInfoAddress = convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: underlyingMint.address }); const mintInfo = await convergence @@ -119,7 +131,12 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { throw Error('Stablecoin mint cannot be used in a leg!'); } - const cvgWallet = new CvgWallet(convergence); + const instrumentIndex = getInstrumentProgramIndex( + await convergence.protocol().get(), + PSYOPTIONS_AMERICAN_INSTRUMENT_PROGRAM_ID + ); + + const cvgWallet = new NoopWallet(taker); const americanProgram = await createAmericanProgram(convergence, cvgWallet); const { optionMint, metaKey } = await getAmericanOptionkeys( americanProgram, @@ -141,6 +158,7 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { optionMint, metaKey, mintInfo.mintType.baseAssetIndex, + instrumentIndex, amount, side, underlyingMint.address, @@ -149,10 +167,11 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { } static async fetchMeta( + taker: PublicKey, convergence: Convergence, metaKey: PublicKey ): Promise { - const cvgWallet = new CvgWallet(convergence); + const cvgWallet = new NoopWallet(taker); const americanProgram = createAmericanProgram(convergence, cvgWallet); const optionMarket = (await psyoptionsAmerican.getOptionByKey( americanProgram, @@ -162,8 +181,9 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { return optionMarket; } - async getOptionMeta() { + async getOptionMeta(taker: PublicKey) { const optionMeta = await PsyoptionsAmericanInstrument.fetchMeta( + taker, this.convergence, this.optionMetaPubKey ); @@ -179,11 +199,11 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { throw new Error('Missing stable asset mint'); } const mintInfoPda = this.convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: this.underlyingAssetMint }); const quoteAssetMintPda = this.convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: this.stableAssetMint }); return [ @@ -240,9 +260,10 @@ export class PsyoptionsAmericanInstrument implements LegInstrument { export const psyoptionsAmericanInstrumentParser = { parseFromLeg( convergence: Convergence, - leg: Leg + leg: Leg, + instrumentIndex: number ): PsyoptionsAmericanInstrument { - const { side, instrumentAmount, instrumentData, baseAssetIndex } = leg; + const { side, amount, data, baseAssetIndex } = leg; const [ { optionType, @@ -255,7 +276,7 @@ export const psyoptionsAmericanInstrumentParser = { metaKey, }, ] = psyoptionsAmericanInstrumentDataSerializer.deserialize( - Buffer.from(instrumentData) + Buffer.from(data) ); return new PsyoptionsAmericanInstrument( @@ -272,7 +293,8 @@ export const psyoptionsAmericanInstrumentParser = { optionMint, metaKey, baseAssetIndex, - removeDecimals(instrumentAmount, PsyoptionsAmericanInstrument.decimals), + instrumentIndex, + removeDecimals(amount, PsyoptionsAmericanInstrument.decimals), fromSolitaLegSide(side) ); }, @@ -280,11 +302,11 @@ export const psyoptionsAmericanInstrumentParser = { export const createAmericanProgram = ( convergence: Convergence, - wallet?: CvgWallet + wallet: NoopWallet ): any => { const provider = new anchor.AnchorProvider( convergence.connection, - wallet ?? new NoopWallet(Keypair.generate()), + wallet, {} ); @@ -298,6 +320,7 @@ export const createAmericanProgram = ( export const getPsyAmericanMarketIxs = async ( cvg: Convergence, + taker: PublicKey, underlyingMint: PublicKey, underlyingMintDecimals: number, underlyingAmountPerContract: number, @@ -307,7 +330,7 @@ export const getPsyAmericanMarketIxs = async ( expirationTimestamp: number, optionType: OptionType ): Promise => { - const cvgWallet = new CvgWallet(cvg); + const cvgWallet = new NoopWallet(taker); const americanProgram = createAmericanProgram(cvg, cvgWallet); const expirationTimestampBN = new BN(expirationTimestamp); diff --git a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/plugin.ts b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/plugin.ts index 54e73f71c..627ea33cc 100644 --- a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/plugin.ts +++ b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/plugin.ts @@ -21,7 +21,7 @@ export const psyoptionsAmericanInstrumentModule = (): ConvergencePlugin => ({ }; convergence.addLegInstrument( - PSYOPTIONS_AMERICAN_INSTRUMENT_PROGRAM_ID, + psyoptionsAmericanInstrumentProgram.address, psyoptionsAmericanInstrumentParser ); }, diff --git a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/types.ts b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/types.ts index 6ea177021..254cf4474 100644 --- a/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/types.ts +++ b/packages/js/src/plugins/psyoptionsAmericanInstrumentModule/types.ts @@ -1,4 +1,3 @@ export type { OptionMarket } from '@mithraic-labs/psy-american'; export { PROGRAM_ID as PSYOPTIONS_AMERICAN_INSTRUMENT_PROGRAM_ID } from '@convergence-rfq/psyoptions-american-instrument'; export { OptionType } from '@mithraic-labs/tokenized-euros'; -export { PsyoptionsAmericanInstrument } from './instrument'; diff --git a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/helpers.ts b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/helpers.ts index 19a24c13e..dae256ce2 100644 --- a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/helpers.ts +++ b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/helpers.ts @@ -21,7 +21,7 @@ export const prepareEuropeanOptions = async ( caller: PublicKey ) => { const ixTracker = new InstructionUniquenessTracker([]); - const europeanProgram = await createEuropeanProgram(convergence); + const europeanProgram = await createEuropeanProgram(convergence, caller); const response = await convergence .rfqs() .findResponseByAddress({ address: responseAddress }); @@ -122,7 +122,7 @@ export const prepareEuropeanOptions = async ( const mintTxBuilder = TransactionBuilder.make().setFeePayer( convergence.rpc().getDefaultFeePayer() ); - mintTxBuilder.add({ + mintTxBuilder.addTxPriorityFeeIx(convergence).add({ instruction: ix, signers: [convergence.identity()], }); diff --git a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/instrument.ts b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/instrument.ts index 14da51155..c5e5a785f 100644 --- a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/instrument.ts +++ b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/instrument.ts @@ -15,17 +15,23 @@ import * as psyoptionsEuropean from '@mithraic-labs/tokenized-euros'; import * as anchor from '@project-serum/anchor'; import { Mint } from '../tokenModule'; import { - CreateOptionInstrumentsResult, LegInstrument, + getInstrumentProgramIndex, + CreateOptionInstrumentsResult, } from '../instrumentModule'; import { addDecimals, removeDecimals } from '../../utils/conversions'; import { assert } from '../../utils/assert'; import { Convergence } from '../../Convergence'; import { createSerializerFromFixableBeetArgsStruct } from '../../types'; import { LegSide, fromSolitaLegSide } from '../rfqModule/models/LegSide'; -import { CvgWallet } from '@/utils'; -export const createEuropeanProgram = async (convergence: Convergence) => { - const cvgWallet = new CvgWallet(convergence); +import { PSYOPTIONS_EUROPEAN_INSTRUMENT_PROGRAM_ID } from './types'; +import { NoopWallet } from '@/utils'; + +export const createEuropeanProgram = async ( + convergence: Convergence, + taker: PublicKey +) => { + const cvgWallet = new NoopWallet(taker); return psyoptionsEuropean.createProgramFromProvider( new anchor.AnchorProvider( convergence.connection, @@ -98,6 +104,7 @@ const euroMetaSerializer = createSerializerFromFixableBeetArgsStruct( */ export class PsyoptionsEuropeanInstrument implements LegInstrument { static readonly decimals = 4; + legType: 'escrow'; constructor( readonly convergence: Convergence, @@ -110,19 +117,26 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { readonly optionMint: PublicKey, readonly optionMetaPubKey: PublicKey, readonly baseAssetIndex: BaseAssetIndex, + readonly instrumentIndex: number, readonly amount: number, readonly side: LegSide, readonly underlyingAssetMint?: PublicKey, readonly stableAssetMint?: PublicKey, readonly oracleAddress?: PublicKey, readonly oracleProviderId?: number - ) {} + ) { + this.legType = 'escrow'; + } + getInstrumentIndex = () => this.instrumentIndex; getBaseAssetIndex = () => this.baseAssetIndex; + getAssetMint = () => this.optionMint; getAmount = () => this.amount; getDecimals = () => PsyoptionsEuropeanInstrument.decimals; getSide = () => this.side; - async getPreparationsBeforeRfqCreation(): Promise { + async getPreparationsBeforeRfqCreation( + taker: PublicKey + ): Promise { if (!this.underlyingAssetMint) { throw new Error('Missing underlying asset mint'); } @@ -137,6 +151,7 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { } const optionMarketIxs = await getPsyEuropeanMarketIxs( this.convergence, + taker, this.underlyingAssetMint, this.underlyingAmountPerContractDecimals, this.underlyingAmountPerContract, @@ -152,6 +167,7 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { } static async create( + taker: PublicKey, convergence: Convergence, underlyingMint: Mint, stableMint: Mint, @@ -165,7 +181,7 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { expirationTimestamp: number ) { const mintInfoAddress = convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: underlyingMint.address }); const mintInfo = await convergence @@ -176,7 +192,14 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { throw Error('Stablecoin mint cannot be used in a leg!'); } - const europeanProgram: any = await createEuropeanProgram(convergence); + const instrumentIndex = getInstrumentProgramIndex( + await convergence.protocol().get(), + PSYOPTIONS_EUROPEAN_INSTRUMENT_PROGRAM_ID + ); + const europeanProgram: any = await createEuropeanProgram( + convergence, + taker + ); const { metaKey, optionMint } = await getEuropeanOptionKeys( europeanProgram, underlyingMint, @@ -198,6 +221,7 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { optionMint, metaKey, mintInfo.mintType.baseAssetIndex, + instrumentIndex, amount, side, underlyingMint.address, @@ -225,7 +249,7 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { { pubkey: this.optionMetaPubKey, isSigner: false, isWritable: false }, { pubkey: this.convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: this.underlyingAssetMint }), isSigner: false, @@ -281,9 +305,10 @@ export class PsyoptionsEuropeanInstrument implements LegInstrument { export const psyoptionsEuropeanInstrumentParser = { parseFromLeg( convergence: Convergence, - leg: Leg + leg: Leg, + instrumentIndex: number ): PsyoptionsEuropeanInstrument { - const { side, instrumentAmount, instrumentData, baseAssetIndex } = leg; + const { side, amount, data, baseAssetIndex } = leg; const [ { optionType, @@ -296,7 +321,7 @@ export const psyoptionsEuropeanInstrumentParser = { metaKey, }, ] = psyoptionsEuropeanInstrumentDataSerializer.deserialize( - Buffer.from(instrumentData) + Buffer.from(data) ); return new PsyoptionsEuropeanInstrument( @@ -313,7 +338,8 @@ export const psyoptionsEuropeanInstrumentParser = { optionMint, metaKey, baseAssetIndex, - removeDecimals(instrumentAmount, PsyoptionsEuropeanInstrument.decimals), + instrumentIndex, + removeDecimals(amount, PsyoptionsEuropeanInstrument.decimals), fromSolitaLegSide(side) ); }, @@ -321,6 +347,7 @@ export const psyoptionsEuropeanInstrumentParser = { export const getPsyEuropeanMarketIxs = async ( cvg: Convergence, + taker: PublicKey, underlyingMint: PublicKey, underlyingMintDecimals: number, underlyingAmountPerContract: number, @@ -331,7 +358,7 @@ export const getPsyEuropeanMarketIxs = async ( oracleAddress: PublicKey, oracleProviderId: number // Switchboard = 1, Pyth = 0 ): Promise => { - const europeanProgram = await createEuropeanProgram(cvg); + const europeanProgram = await createEuropeanProgram(cvg, taker); const expirationTimestamp = new BN(expirationTimeStamp); const quoteAmountPerContractBN = new BN( addDecimals(strike, stableMintDecimals) diff --git a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/plugin.ts b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/plugin.ts index b20fc6902..f5e0bb63f 100644 --- a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/plugin.ts +++ b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/plugin.ts @@ -1,6 +1,6 @@ -import { PROGRAM_ID } from '@convergence-rfq/psyoptions-european-instrument'; import { ProgramClient } from '../programModule'; import { psyoptionsEuropeanInstrumentParser } from './instrument'; +import { PSYOPTIONS_EUROPEAN_INSTRUMENT_PROGRAM_ID } from './types'; import { ConvergencePlugin, Program } from '@/types'; import type { Convergence } from '@/Convergence'; @@ -9,7 +9,7 @@ export const psyoptionsEuropeanInstrumentModule = (): ConvergencePlugin => ({ install(convergence: Convergence) { const psyoptionsEuropeanInstrumentProgram = { name: 'PsyoptionsEuropeanInstrumentProgram', - address: PROGRAM_ID, + address: PSYOPTIONS_EUROPEAN_INSTRUMENT_PROGRAM_ID, }; convergence.programs().register(psyoptionsEuropeanInstrumentProgram); diff --git a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/types.ts b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/types.ts index 9eb29fa4b..78763f8f2 100644 --- a/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/types.ts +++ b/packages/js/src/plugins/psyoptionsEuropeanInstrumentModule/types.ts @@ -1,3 +1,3 @@ -export { PROGRAM_ADDRESS as PSYOPTIONS_EUROPEAN_INSTRUMENT_PROGRAM_ADDRESS } from '@convergence-rfq/psyoptions-european-instrument'; +export { PROGRAM_ID as PSYOPTIONS_EUROPEAN_INSTRUMENT_PROGRAM_ID } from '@convergence-rfq/psyoptions-european-instrument'; export type { EuroMeta } from '@convergence-rfq/psyoptions-european-instrument'; export { OptionType } from '@mithraic-labs/tokenized-euros'; diff --git a/packages/js/src/plugins/rfqModule/RfqClient.ts b/packages/js/src/plugins/rfqModule/RfqClient.ts index d5e6385d5..98b3e02da 100644 --- a/packages/js/src/plugins/rfqModule/RfqClient.ts +++ b/packages/js/src/plugins/rfqModule/RfqClient.ts @@ -39,12 +39,8 @@ import { FindResponsesByRfqInput, findResponsesByOwnerOperation, FindResponsesByOwnerInput, - partiallySettleLegsOperation, - PartiallySettleLegsInput, partlyRevertSettlementPreparationOperation, PartlyRevertSettlementPreparationInput, - partiallySettleLegsAndSettleOperation, - PartiallySettleLegsAndSettleInput, revertSettlementPreparationOperation, RevertSettlementPreparationInput, prepareMoreLegsSettlementOperation, @@ -57,14 +53,6 @@ import { RespondToRfqInput, settleOperation, SettleInput, - settleOnePartyDefaultOperation, - SettleOnePartyDefaultInput, - settleTwoPartyDefaultOperation, - SettleTwoPartyDefaultInput, - unlockResponseCollateralOperation, - UnlockResponseCollateralInput, - unlockRfqCollateralOperation, - UnlockRfqCollateralInput, createAndFinalizeRfqConstructionOperation, CleanUpRfqsInput, cleanUpRfqsOperation, @@ -72,12 +60,12 @@ import { CleanUpResponseInput, cleanUpResponsesOperation, CleanUpResponsesInput, - unlockResponsesCollateralOperation, - UnlockResponsesCollateralInput, - UnlockRfqsCollateralInput, - unlockRfqsCollateralOperation, GetSettlementResultInput, getSettlementResultOperation, + CreatePrintTradeRfqInput, + createPrintTradeRfqOperation, + preparePrintTradeSettlementOperation, + PreparePrintTradeSettlementInput, getSettlementResultHandler, GetResponseStateAndActionInput, getResponseStateAndActionOperation, @@ -247,6 +235,16 @@ export class RfqClient { .execute(finalizeRfqConstructionOperation(input), options); } + /** {@inheritDoc createPrintTradeRfqOperation} */ + createPrintTrade( + input: CreatePrintTradeRfqInput, + options?: OperationOptions + ) { + return this.convergence + .operations() + .execute(createPrintTradeRfqOperation(input), options); + } + /** {@inheritDoc findResponseByAddressOperation} */ findResponseByAddress( input: FindResponseByAddressInput, @@ -290,16 +288,6 @@ export class RfqClient { .execute(findRfqByAddressOperation(input), options); } - /** {@inheritDoc partiallySettleLegsOperation} */ - partiallySettleLegs( - input: PartiallySettleLegsInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(partiallySettleLegsOperation(input), options); - } - /** {@inheritDoc partlyRevertSettlementPreparationOperation} */ partlyRevertSettlementPreparation( input: PartlyRevertSettlementPreparationInput, @@ -310,16 +298,6 @@ export class RfqClient { .execute(partlyRevertSettlementPreparationOperation(input), options); } - /** {@inheritDoc partiallySettleLegsAndSettleOperation} */ - partiallySettleLegsAndSettle( - input: PartiallySettleLegsAndSettleInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(partiallySettleLegsAndSettleOperation(input), options); - } - /** {@inheritDoc revertSettlementPreparationOperation} */ revertSettlementPreparation( input: RevertSettlementPreparationInput, @@ -357,6 +335,16 @@ export class RfqClient { .execute(prepareSettlementAndPrepareMoreLegsOperation(input), options); } + /** {@inheritDoc preparePrintTradeSettlementOperation} */ + preparePrintTradeSettlement( + input: PreparePrintTradeSettlementInput, + options?: OperationOptions + ) { + return this.convergence + .operations() + .execute(preparePrintTradeSettlementOperation(input), options); + } + /** * Helper method that refetches a given model * and returns an instance of the same type. @@ -419,66 +407,6 @@ export class RfqClient { .execute(settleOperation(input), options); } - /** {@inheritDoc settleOnePartyDefaultOperation} */ - settleOnePartyDefault( - input: SettleOnePartyDefaultInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(settleOnePartyDefaultOperation(input), options); - } - - /** {@inheritDoc settleTwoPartyDefaultOperation} */ - settleTwoPartyDefault( - input: SettleTwoPartyDefaultInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(settleTwoPartyDefaultOperation(input), options); - } - - /** {@inheritDoc unlockResponseCollateralOperation} */ - unlockResponseCollateral( - input: UnlockResponseCollateralInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(unlockResponseCollateralOperation(input), options); - } - - /** {@inheritDoc unlockResponsesCollateralOperation} */ - unlockResponsesCollateral( - input: UnlockResponsesCollateralInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(unlockResponsesCollateralOperation(input), options); - } - - /** {@inheritDoc unlockRfqCollateralOperation} */ - unlockRfqCollateral( - input: UnlockRfqCollateralInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(unlockRfqCollateralOperation(input), options); - } - - /** {@inheritDoc unlockRfqsCollateralOperation} */ - unlockRfqsCollateral( - input: UnlockRfqsCollateralInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(unlockRfqsCollateralOperation(input), options); - } - /** {@inheritDoc sendTokensOperation} */ send( input: PartialKeys, diff --git a/packages/js/src/plugins/rfqModule/RfqPdasClient.ts b/packages/js/src/plugins/rfqModule/RfqPdasClient.ts index ac539fa9a..7f2e9bfc6 100644 --- a/packages/js/src/plugins/rfqModule/RfqPdasClient.ts +++ b/packages/js/src/plugins/rfqModule/RfqPdasClient.ts @@ -1,18 +1,15 @@ import { Buffer } from 'buffer'; import { Sha256 } from '@aws-crypto/sha256-js'; import { - FixedSize as SolitaFixedSize, OrderType as SolitaOrderType, QuoteAsset, - QuoteRecord, - FixedSizeRecord, Quote, - priceQuoteBeet, + quoteBeet, + quoteAssetBeet, } from '@convergence-rfq/rfq'; -import * as anchor from '@project-serum/anchor'; import * as beet from '@convergence-rfq/beet'; -import * as beetSolana from '@convergence-rfq/beet-solana'; +import BN from 'bn.js'; import { createSerializerFromFixableBeetArgsStruct, createSerializerFromFixableBeet, @@ -25,6 +22,7 @@ import type { Convergence } from '../../Convergence'; import { Option } from '../../utils'; import { FixedSize, toSolitaFixedSize } from './models'; import { OrderType, toSolitaOrderType } from './models/OrderType'; +import { serializeFixedSizeData } from './helpers'; function toLittleEndian(value: number, bytes: number) { const buf = Buffer.allocUnsafe(bytes); @@ -40,21 +38,13 @@ function toLittleEndian(value: number, bytes: number) { */ export class RfqPdasClient { constructor(protected readonly convergence: Convergence) {} - /** Finds the PDA of a given mint. */ - mintInfo({ mint }: MintInfoInput): Pda { - const programId = this.programId(); - return Pda.find(programId, [ - Buffer.from('mint_info', 'utf8'), - mint.toBuffer(), - ]); - } /** Finds the PDA of a given quote asset. */ quote({ quoteAsset }: QuoteInput): Pda { const programId = this.programId(); return Pda.find(programId, [ Buffer.from('mint_info', 'utf8'), - quoteAsset.instrumentData, + quoteAsset.data, ]); } @@ -62,6 +52,7 @@ export class RfqPdasClient { rfq({ taker, legsHash, + printTradeProvider, orderType, quoteAsset, fixedSize, @@ -79,11 +70,10 @@ export class RfqPdasClient { Buffer.from('rfq', 'utf8'), taker.toBuffer(), legsHash, + (printTradeProvider || PublicKey.default).toBuffer(), serializeOrderTypeData(toSolitaOrderType(orderType)), quoteHash, - serializeFixedSizeData( - toSolitaFixedSize(fixedSize, quoteAsset.instrumentDecimals) - ), + serializeFixedSizeData(toSolitaFixedSize(fixedSize, quoteAsset.decimals)), toLittleEndian(activeWindow, 4), toLittleEndian(settlingWindow, 4), recentTimestamp.toArrayLike(Buffer, 'le', 8), @@ -127,88 +117,18 @@ const serializeOrderTypeData = (orderType: SolitaOrderType): Buffer => { }; const serializeQuoteData = (quote: Quote): Buffer => { - const quoteBeet = beet.dataEnum([ - [ - 'Standard', - new beet.FixableBeetArgsStruct( - [ - ['priceQuote', priceQuoteBeet], - ['legsMultiplierBps', beet.u64], - ], - 'QuoteRecord["Standard"]' - ), - ], - - [ - 'FixedSize', - new beet.FixableBeetArgsStruct( - [['priceQuote', priceQuoteBeet]], - 'QuoteRecord["FixedSize"]' - ), - ], - ]) as beet.FixableBeet; - const quoteSerializer = createSerializerFromFixableBeet(quoteBeet); return quoteSerializer.serialize(quote); }; const serializeQuoteAssetData = (quoteAsset: QuoteAsset): Buffer => { - const quoteAssetBeet = new beet.FixableBeetArgsStruct( - [ - ['instrumentProgram', beetSolana.publicKey], - ['instrumentData', beet.bytes], - ['instrumentDecimals', beet.u8], - ], - 'QuoteAsset' - ); - const quoteAssetSerializer = createSerializerFromFixableBeetArgsStruct(quoteAssetBeet); return quoteAssetSerializer.serialize(quoteAsset); }; -const serializeFixedSizeData = (fixedSize: SolitaFixedSize): Buffer => { - const fixedSizeBeet = beet.dataEnum([ - [ - 'None', - new beet.BeetArgsStruct( - [['padding', beet.u64]], - 'FixedSizeRecord["None"]' - ), - ], - - [ - 'BaseAsset', - new beet.BeetArgsStruct( - [['legsMultiplierBps', beet.u64]], - 'FixedSizeRecord["BaseAsset"]' - ), - ], - - [ - 'QuoteAsset', - new beet.BeetArgsStruct( - [['quoteAmount', beet.u64]], - 'FixedSizeRecord["QuoteAsset"]' - ), - ], - ]) as beet.FixableBeet; - - const fixedSizeSerializer = createSerializerFromFixableBeet(fixedSizeBeet); - - return fixedSizeSerializer.serialize(fixedSize); -}; - -type MintInfoInput = { - /** The address of the mint account. */ - mint: PublicKey; - - /** An optional set of programs that override the registered ones. */ - programs?: Program[]; -}; - type QuoteInput = { /** The quote asset. */ quoteAsset: QuoteAsset; @@ -224,6 +144,8 @@ type RfqInput = { /** The SHA256 hash of the serialized legs of the RFQ. */ legsHash: Buffer; + printTradeProvider: PublicKey | null; + /** The order type of the Rfq. */ orderType: OrderType; @@ -247,7 +169,7 @@ type RfqInput = { settlingWindow: number; /** A recent timestamp. */ - recentTimestamp: anchor.BN; + recentTimestamp: BN; // recentTimestamp: number; }; diff --git a/packages/js/src/plugins/rfqModule/helpers.ts b/packages/js/src/plugins/rfqModule/helpers.ts index 0fa5c3608..39ee50fe6 100644 --- a/packages/js/src/plugins/rfqModule/helpers.ts +++ b/packages/js/src/plugins/rfqModule/helpers.ts @@ -1,6 +1,10 @@ -import { AccountMeta } from '@solana/web3.js'; +import { AccountMeta, PublicKey } from '@solana/web3.js'; import { Sha256 } from '@aws-crypto/sha256-js'; -import { ApiLeg } from '@convergence-rfq/rfq'; +import { + ApiLeg, + FixedSize as SolitaFixedSize, + fixedSizeBeet, +} from '@convergence-rfq/rfq'; import { Confirmation, Quote, @@ -8,17 +12,15 @@ import { isFixedSizeQuoteAsset, isQuoteStandard, } from '../rfqModule/models'; -import { UnparsedAccount } from '../../types'; +import { UnparsedAccount, createSerializerFromFixableBeet } from '../../types'; import { Convergence } from '../../Convergence'; import { LegInstrument, - getSerializedLegLength, getValidationAccounts, - serializeAsLeg, - toLeg, + instrumentToSolitaLeg, } from '../instrumentModule'; +import { Rfq, Response, AuthoritySide, isFixedSizeOpen } from './models'; import { LEG_MULTIPLIER_DECIMALS } from './constants'; -import { Rfq, Response, isFixedSizeOpen } from './models'; export function getPages( accounts: T[], @@ -52,18 +54,11 @@ export function getPages( } export const calculateExpectedLegsHash = ( - instruments: LegInstrument[] + serializedLegs: Buffer[] ): Uint8Array => { - const serializedLegsData: Buffer[] = instruments.map((i) => - serializeAsLeg(i) - ); - const lengthBuffer = Buffer.alloc(4); - lengthBuffer.writeInt32LE(instruments.length); - const fullLegDataBuffer = Buffer.concat([ - lengthBuffer, - ...serializedLegsData, - ]); + lengthBuffer.writeInt32LE(serializedLegs.length); + const fullLegDataBuffer = Buffer.concat([lengthBuffer, ...serializedLegs]); const hash = new Sha256(); hash.update(fullLegDataBuffer); @@ -72,37 +67,12 @@ export const calculateExpectedLegsHash = ( return expectedLegsHash; }; -export const calculateExpectedLegsSize = ( - instruments: LegInstrument[] -): number => { - return ( - 4 + - instruments.map((i) => getSerializedLegLength(i)).reduce((x, y) => x + y, 0) - ); -}; - -// TODO remove -export const instrumentsToLegsAndLegsSize = ( - instruments: LegInstrument[] -): [ApiLeg[], number] => { - return [ - instrumentsToLegs(instruments), - calculateExpectedLegsSize(instruments), - ]; +export const calculateExpectedLegsSize = (serializedLegs: Buffer[]): number => { + return 4 + serializedLegs.map((leg) => leg.length).reduce((x, y) => x + y, 0); }; export const instrumentsToLegs = (instruments: LegInstrument[]): ApiLeg[] => { - return instruments.map((i) => toLeg(i)); -}; - -// TODO remove -export const instrumentsToLegsAndExpectedLegsHash = ( - instruments: LegInstrument[] -): [ApiLeg[], Uint8Array] => { - return [ - instrumentsToLegs(instruments), - calculateExpectedLegsHash(instruments), - ]; + return instruments.map((i) => instrumentToSolitaLeg(i)); }; export const legsToBaseAssetAccounts = ( @@ -155,6 +125,22 @@ export const sortByActiveAndExpiry = (rfqs: Rfq[]) => { }); }; +export const getAuthoritySide = ( + user: PublicKey, + rfq: Rfq, + response: Response +): AuthoritySide | null => { + if (rfq.taker.equals(user)) { + return 'taker'; + } + + if (response.maker.equals(user)) { + return 'maker'; + } + + return null; +}; + export function extractLegsMultiplier( rfq: Rfq, quote: Quote, @@ -188,3 +174,9 @@ export function extractLegsMultiplier( } throw new Error('Invalid fixed size'); } + +export const serializeFixedSizeData = (fixedSize: SolitaFixedSize): Buffer => { + const fixedSizeSerializer = createSerializerFromFixableBeet(fixedSizeBeet); + + return fixedSizeSerializer.serialize(fixedSize); +}; diff --git a/packages/js/src/plugins/rfqModule/models/Response.ts b/packages/js/src/plugins/rfqModule/models/Response.ts index 463e802f8..d2e538c6e 100644 --- a/packages/js/src/plugins/rfqModule/models/Response.ts +++ b/packages/js/src/plugins/rfqModule/models/Response.ts @@ -14,6 +14,7 @@ import { fromSolitaStoredResponseState, } from './StoredResponseState'; import { fromSolitaQuote, Quote } from './Quote'; +import { Rfq, isSettledAsPrintTrade } from './Rfq'; /** * This model captures all the relevant information about a response @@ -21,10 +22,7 @@ import { fromSolitaQuote, Quote } from './Quote'; * * @group Models */ -export type Response = { - /** A model identifier to distinguish models in the SDK. */ - readonly model: 'response'; - +type CommonResponse = { /** The address of the response. */ readonly address: PublicKey; @@ -55,6 +53,19 @@ export type Response = { /** The current state of the response. */ readonly state: StoredResponseState; + // TODO: Should be a ResponseSide? + /** The optional confirmation of this response. */ + readonly confirmed: Confirmation | null; + + // + /** The optional defaulting party of this response. */ + readonly defaultingParty: SolitaDefaultingParty | null; +}; + +export type EscrowResponse = CommonResponse & { + /** A model identifier to distinguish models in the SDK. */ + readonly model: 'escrowResponse'; + /** The number of legs prepared by the taker. */ readonly takerPreparedLegs: number; @@ -64,21 +75,32 @@ export type Response = { /** The number of legs that have already been settled. */ readonly settledLegs: number; - // TODO: Should be a ResponseSide? - /** The optional confirmation of this response. */ - readonly confirmed: Confirmation | null; - - // - /** The optional defaulting party of this response. */ - readonly defaultingParty: SolitaDefaultingParty | null; - /** Shows whether the maker or taker initialized preparation for each prepared leg. */ readonly legPreparationsInitializedBy: AuthoritySide[]; }; +export type PrintTradeResponse = CommonResponse & { + /** A model identifier to distinguish models in the SDK. */ + readonly model: 'printTradeResponse'; + + /** The number of legs prepared by the taker. */ + readonly takerPrepared: boolean; + + /** The number of legs prepared by the maker. */ + readonly makerPrepared: boolean; + + /** Shows whether the maker or taker initialized the print trade. */ + readonly printTradeInitializedBy: AuthoritySide | null; + + readonly additionalData: Uint8Array; +}; + +export type Response = EscrowResponse | PrintTradeResponse; + /** @group Model Helpers */ export const isResponse = (value: any): value is Response => - typeof value === 'object' && value.model === 'response'; + typeof value === 'object' && + (value.model === 'escrowResponse' || value.model === 'printTradeResponse'); /** @group Model Helpers */ export function assertResponse(value: any): asserts value is Response { @@ -89,39 +111,65 @@ export function assertResponse(value: any): asserts value is Response { export const toResponse = ( account: ResponseAccount, collateralDecimals: number, - quoteDecimals: number -): Response => ({ - model: 'response', - address: account.publicKey, - maker: account.data.maker, - rfq: account.data.rfq, - creationTimestamp: convertTimestampToMilliSeconds( - account.data.creationTimestamp - ), - expirationTimestamp: convertTimestampToMilliSeconds( - account.data.expirationTimestamp - ), - makerCollateralLocked: removeDecimals( - account.data.makerCollateralLocked, - collateralDecimals - ), - takerCollateralLocked: removeDecimals( - account.data.takerCollateralLocked, - collateralDecimals - ), - state: fromSolitaStoredResponseState(account.data.state), - // TODO: Abstract with response model method - takerPreparedLegs: account.data.takerPreparedLegs, - // TODO: Abstract with response model method - makerPreparedLegs: account.data.makerPreparedLegs, - // TODO: Abstract with response model method - settledLegs: account.data.settledLegs, - confirmed: - account.data.confirmed && fromSolitaConfirmation(account.data.confirmed), - defaultingParty: account.data.defaultingParty, - legPreparationsInitializedBy: account.data.legPreparationsInitializedBy.map( - fromSolitaAuthoritySide - ), - bid: account.data.bid && fromSolitaQuote(account.data.bid, quoteDecimals), - ask: account.data.ask && fromSolitaQuote(account.data.ask, quoteDecimals), -}); + rfq: Rfq +): Response => { + if (!rfq.address.equals(account.data.rfq)) { + throw new Error('Passed rfq does not match the one stored in response'); + } + + const commonResponse: CommonResponse = { + address: account.publicKey, + maker: account.data.maker, + rfq: account.data.rfq, + creationTimestamp: convertTimestampToMilliSeconds( + account.data.creationTimestamp + ), + expirationTimestamp: convertTimestampToMilliSeconds( + account.data.expirationTimestamp + ), + makerCollateralLocked: removeDecimals( + account.data.makerCollateralLocked, + collateralDecimals + ), + takerCollateralLocked: removeDecimals( + account.data.takerCollateralLocked, + collateralDecimals + ), + state: fromSolitaStoredResponseState(account.data.state), + bid: + account.data.bid && + fromSolitaQuote(account.data.bid, rfq.quoteAsset.getDecimals()), + ask: + account.data.ask && + fromSolitaQuote(account.data.ask, rfq.quoteAsset.getDecimals()), + confirmed: + account.data.confirmed && fromSolitaConfirmation(account.data.confirmed), + defaultingParty: account.data.defaultingParty, + }; + + if (isSettledAsPrintTrade(rfq)) { + return { + model: 'printTradeResponse', + ...commonResponse, + takerPrepared: account.data.takerPreparedCounter > 0, + makerPrepared: account.data.makerPreparedCounter > 0, + printTradeInitializedBy: + account.data.printTradeInitializedBy !== null + ? fromSolitaAuthoritySide(account.data.printTradeInitializedBy) + : null, + additionalData: account.data.additionalData, + }; + } + + return { + model: 'escrowResponse', + ...commonResponse, + takerPreparedLegs: account.data.takerPreparedCounter, + makerPreparedLegs: account.data.makerPreparedCounter, + settledLegs: account.data.settledEscrowLegs, + legPreparationsInitializedBy: + account.data.escrowLegPreparationsInitializedBy.map( + fromSolitaAuthoritySide + ), + }; +}; diff --git a/packages/js/src/plugins/rfqModule/models/Rfq.ts b/packages/js/src/plugins/rfqModule/models/Rfq.ts index d7275e993..3df2c9ad3 100644 --- a/packages/js/src/plugins/rfqModule/models/Rfq.ts +++ b/packages/js/src/plugins/rfqModule/models/Rfq.ts @@ -18,6 +18,11 @@ import { collateralMintCache } from '../../../plugins/collateralModule'; import { FixedSize, fromSolitaFixedSize } from './FixedSize'; import { OrderType, fromSolitaOrderType } from './OrderType'; import { StoredRfqState, fromSolitaStoredRfqState } from './StoredRfqState'; +import { + PrintTrade, + PrintTradeLeg, + PrintTradeQuote, +} from '@/plugins/printTradeModule'; /** * This model captures all the relevant information about an RFQ @@ -25,10 +30,7 @@ import { StoredRfqState, fromSolitaStoredRfqState } from './StoredRfqState'; * * @group Models */ -export type Rfq = { - /** A model identifier to distinguish models in the SDK. */ - readonly model: 'rfq'; - +type CommonRfq = { /** The address of the Rfq. */ readonly address: PublicKey; @@ -42,12 +44,6 @@ export type Rfq = { * or a fixed amount of the quote asset. */ readonly size: FixedSize; - /** The quote asset of the Rfq. */ - readonly quoteAsset: QuoteInstrument; - - /** The quote asset mint. */ - readonly quoteMint: PublicKey; - /** The time at which this Rfq was created. */ readonly creationTimestamp: number; @@ -85,41 +81,83 @@ export type Rfq = { /** The address of the Whitelist. */ readonly whitelist: PublicKey; +}; + +export type EscrowRfq = CommonRfq & { + /** A model identifier to distinguish models in the SDK. */ + readonly model: 'escrowRfq'; + + /** The quote asset of the Rfq. */ + readonly quoteAsset: QuoteInstrument; + + /** The quote asset mint. */ + readonly quoteMint: PublicKey; /** The legs of the Rfq. */ readonly legs: LegInstrument[]; }; +export type PrintTradeRfq = CommonRfq & { + /** A model identifier to distinguish models in the SDK. */ + readonly model: 'printTradeRfq'; + + /** A model that stores legs, quote info and a settlement venue. */ + readonly printTrade: PrintTrade; + + /** The quote asset of the Rfq. */ + readonly quoteAsset: PrintTradeQuote; + + /** The legs of the Rfq. */ + readonly legs: PrintTradeLeg[]; +}; + +export type Rfq = EscrowRfq | PrintTradeRfq; + /** @group Model Helpers */ -export const isRfq = (value: any): value is Rfq => - typeof value === 'object' && value.model === 'rfq'; +export const isEscrowRfq = (value: any): value is Rfq => + typeof value === 'object' && value.model === 'escrowRfq'; + +export const isPrintTradeRfq = (value: any): value is Rfq => + typeof value === 'object' && value.model === 'printTradeRfq'; /** @group Model Helpers */ export function assertRfq(value: any): asserts value is Rfq { - assert(isRfq(value), 'Expected Rfq model'); + assert(isEscrowRfq(value) || isPrintTradeRfq(value), 'Expected Rfq model'); +} + +export function assertEscrowRfq(value: any): asserts value is EscrowRfq { + assert(isEscrowRfq(value), 'Expected Escrow Rfq model'); +} + +export function assertPrintTradeRfq( + value: any +): asserts value is PrintTradeRfq { + assert(isPrintTradeRfq(value), 'Expected Print Trade Rfq model'); +} + +export function isSettledAsPrintTrade(rfq: Rfq): boolean { + return rfq.model === 'printTradeRfq'; } /** @group Model Helpers */ export const toRfq = async ( - convergence: Convergence, + cvg: Convergence, account: RfqAccount ): Promise => { + const protocol = await cvg.protocol().get(); const quoteAsset = await SpotQuoteInstrument.parseFromQuote( - convergence, + cvg, + protocol, account.data.quoteAsset ); - const collateralMint = await collateralMintCache.get(convergence); + const collateralMint = await collateralMintCache.get(cvg); const collateralDecimals = collateralMint.decimals; - return { - model: 'rfq', + + const commonRfq: CommonRfq = { address: account.publicKey, taker: account.data.taker, orderType: fromSolitaOrderType(account.data.orderType), size: fromSolitaFixedSize(account.data.fixedSize, quoteAsset.getDecimals()), - quoteAsset, - quoteMint: SpotLegInstrument.deserializeInstrumentData( - Buffer.from(account.data.quoteAsset.instrumentData) - ).mintAddress, creationTimestamp: convertTimestampToMilliSeconds( account.data.creationTimestamp ), @@ -139,6 +177,32 @@ export const toRfq = async ( clearedResponses: account.data.clearedResponses, confirmedResponses: account.data.confirmedResponses, whitelist: account.data.whitelist, - legs: account.data.legs.map((leg) => convergence.parseLegInstrument(leg)), + }; + + if (account.data.printTradeProvider === null) { + return { + model: 'escrowRfq', + ...commonRfq, + quoteAsset, + quoteMint: SpotLegInstrument.deserializeInstrumentData( + Buffer.from(account.data.quoteAsset.data) + ).mintAddress, + legs: account.data.legs.map((leg) => + cvg.parseLegInstrument(leg, protocol) + ), + }; + } + + const printTrade = cvg.parsePrintTrade( + account.data.printTradeProvider, + account.data.legs, + account.data.quoteAsset + ); + return { + model: 'printTradeRfq', + ...commonRfq, + printTrade, + legs: printTrade.getLegs(), + quoteAsset: printTrade.getQuote(), }; }; diff --git a/packages/js/src/plugins/rfqModule/models/StoredResponseState.ts b/packages/js/src/plugins/rfqModule/models/StoredResponseState.ts index 82c2c6d8d..380547130 100644 --- a/packages/js/src/plugins/rfqModule/models/StoredResponseState.ts +++ b/packages/js/src/plugins/rfqModule/models/StoredResponseState.ts @@ -7,9 +7,12 @@ export type StoredResponseState = | 'ready-for-settling' | 'settled' | 'settling-preparations' - | 'waiting-for-last-look' + | 'settlement-expired' + | 'waiting-for-last-look'; -export function fromSolitaStoredResponseState(StoredResponseState: SolitaStoredResponseState): StoredResponseState { +export function fromSolitaStoredResponseState( + StoredResponseState: SolitaStoredResponseState +): StoredResponseState { switch (StoredResponseState) { case SolitaStoredResponseState.Active: { return 'active'; @@ -29,13 +32,18 @@ export function fromSolitaStoredResponseState(StoredResponseState: SolitaStoredR case SolitaStoredResponseState.SettlingPreparations: { return 'settling-preparations'; } + case SolitaStoredResponseState.SettlementExpired: { + return 'settlement-expired'; + } case SolitaStoredResponseState.WaitingForLastLook: { return 'waiting-for-last-look'; } } } -export function toSolitaStoredResponseState(StoredResponseState: StoredResponseState): SolitaStoredResponseState { +export function toSolitaStoredResponseState( + StoredResponseState: StoredResponseState +): SolitaStoredResponseState { switch (StoredResponseState) { case 'active': { return SolitaStoredResponseState.Active; @@ -55,6 +63,9 @@ export function toSolitaStoredResponseState(StoredResponseState: StoredResponseS case 'settling-preparations': { return SolitaStoredResponseState.SettlingPreparations; } + case 'settlement-expired': { + return SolitaStoredResponseState.SettlementExpired; + } case 'waiting-for-last-look': { return SolitaStoredResponseState.WaitingForLastLook; } diff --git a/packages/js/src/plugins/rfqModule/models/StoredRfqState.ts b/packages/js/src/plugins/rfqModule/models/StoredRfqState.ts index 0062f7716..ab6ff5440 100644 --- a/packages/js/src/plugins/rfqModule/models/StoredRfqState.ts +++ b/packages/js/src/plugins/rfqModule/models/StoredRfqState.ts @@ -1,10 +1,15 @@ import { StoredRfqState as SolitaStoredRfqState } from '@convergence-rfq/rfq'; type Constructed = 'constructed'; +type ValidatedByPrintTradeProvider = 'validated-by-print-trade-provider'; type Active = 'active'; type Canceled = 'canceled'; -export type StoredRfqState = Constructed | Active | Canceled; +export type StoredRfqState = + | Constructed + | ValidatedByPrintTradeProvider + | Active + | Canceled; export function fromSolitaStoredRfqState( state: SolitaStoredRfqState @@ -13,6 +18,9 @@ export function fromSolitaStoredRfqState( case SolitaStoredRfqState.Constructed: { return 'constructed'; } + case SolitaStoredRfqState.ValidatedByPrintTradeProvider: { + return 'validated-by-print-trade-provider'; + } case SolitaStoredRfqState.Active: { return 'active'; } @@ -29,6 +37,9 @@ export function toSolitaStoredRfqState( case 'constructed': { return SolitaStoredRfqState.Constructed; } + case 'validated-by-print-trade-provider': { + return SolitaStoredRfqState.ValidatedByPrintTradeProvider; + } case 'active': { return SolitaStoredRfqState.Active; } diff --git a/packages/js/src/plugins/rfqModule/operations/addLegsToRfq.ts b/packages/js/src/plugins/rfqModule/operations/addLegsToRfq.ts index 78bf2d36e..b5499f9dc 100644 --- a/packages/js/src/plugins/rfqModule/operations/addLegsToRfq.ts +++ b/packages/js/src/plugins/rfqModule/operations/addLegsToRfq.ts @@ -1,8 +1,12 @@ import { createAddLegsToRfqInstruction } from '@convergence-rfq/rfq'; -import { PublicKey, AccountMeta } from '@solana/web3.js'; +import { PublicKey } from '@solana/web3.js'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { instrumentsToLegAccounts, instrumentsToLegs } from '../helpers'; +import { + instrumentsToLegAccounts, + instrumentsToLegs, + legsToBaseAssetAccounts, +} from '../helpers'; import { Convergence } from '../../../Convergence'; import { Operation, @@ -136,28 +140,13 @@ export const addLegsToRfqBuilder = async ( const legs = instrumentsToLegs(instruments); const legAccounts = await instrumentsToLegAccounts(instruments); - const baseAssetAccounts: AccountMeta[] = []; - const baseAssetIndexValues = []; - for (const leg of legs) { - baseAssetIndexValues.push(leg.baseAssetIndex.value); - } - - for (const value of baseAssetIndexValues) { - const baseAsset = convergence.protocol().pdas().baseAsset({ index: value }); - - const baseAssetAccount: AccountMeta = { - pubkey: baseAsset, - isSigner: false, - isWritable: false, - }; - - baseAssetAccounts.push(baseAssetAccount); - } + const baseAssetAccounts = legsToBaseAssetAccounts(convergence, legs); const rfqProgram = convergence.programs().getRfq(programs); return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createAddLegsToRfqInstruction( { diff --git a/packages/js/src/plugins/rfqModule/operations/cancelResponse.ts b/packages/js/src/plugins/rfqModule/operations/cancelResponse.ts index 5d89a9df7..fb5ee5f6b 100644 --- a/packages/js/src/plugins/rfqModule/operations/cancelResponse.ts +++ b/packages/js/src/plugins/rfqModule/operations/cancelResponse.ts @@ -137,6 +137,7 @@ export const cancelResponseBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCancelResponseInstruction( { diff --git a/packages/js/src/plugins/rfqModule/operations/cancelRfq.ts b/packages/js/src/plugins/rfqModule/operations/cancelRfq.ts index 57a39ea2f..86f618988 100644 --- a/packages/js/src/plugins/rfqModule/operations/cancelRfq.ts +++ b/packages/js/src/plugins/rfqModule/operations/cancelRfq.ts @@ -126,6 +126,7 @@ export const cancelRfqBuilder = async ( } = params; return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCancelRfqInstruction( { diff --git a/packages/js/src/plugins/rfqModule/operations/cleanUpResponse.ts b/packages/js/src/plugins/rfqModule/operations/cleanUpResponse.ts index 37442530b..c8d0ac84b 100644 --- a/packages/js/src/plugins/rfqModule/operations/cleanUpResponse.ts +++ b/packages/js/src/plugins/rfqModule/operations/cleanUpResponse.ts @@ -11,8 +11,15 @@ import { } from '../../../types'; import { TransactionBuilder, TransactionBuilderOptions } from '../../../utils'; import { InstrumentPdasClient } from '../../instrumentModule/InstrumentPdasClient'; +import { + EscrowResponse, + EscrowRfq, + PrintTradeResponse, + PrintTradeRfq, +} from '../models'; import { legToBaseAssetMint } from '@/plugins/instrumentModule'; -import { SendAndConfirmTransactionResponse } from '@/plugins'; +import { SendAndConfirmTransactionResponse } from '@/plugins/rpcModule'; +import { prependWithProviderProgram } from '@/plugins/printTradeModule'; const Key = 'cleanUpResponseOperation' as const; @@ -54,18 +61,6 @@ export type CleanUpResponseInput = { * The address of the reponse accounts. */ response: PublicKey; - - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** - * The maker public key address. - */ - maker: PublicKey; }; /** @@ -127,22 +122,75 @@ export const cleanUpResponseBuilder = async ( convergence: Convergence, params: CleanUpResponseBuilderParams, options: TransactionBuilderOptions = {} +): Promise => { + const responseModel = await convergence + .rfqs() + .findResponseByAddress({ address: params.response }); + const rfqModel = await convergence + .rfqs() + .findRfqByAddress({ address: responseModel.rfq }); + + if ( + responseModel.model === 'escrowResponse' && + rfqModel.model === 'escrowRfq' + ) { + return cleanUpEscrowResponseBuilder( + convergence, + { + response: responseModel, + rfq: rfqModel, + }, + options + ); + } else if ( + responseModel.model === 'printTradeResponse' && + rfqModel.model === 'printTradeRfq' + ) { + return cleanUpPrintTradeResponseBuilder( + convergence, + { + response: responseModel, + rfq: rfqModel, + }, + options + ); + } + + throw new Error('Rfq type does not match with response type!'); +}; + +export type CleanUpEscrowResponseBuilderParams = { + response: PublicKey | EscrowResponse; + rfq?: EscrowRfq; +}; + +export const cleanUpEscrowResponseBuilder = async ( + convergence: Convergence, + params: CleanUpEscrowResponseBuilderParams, + options: TransactionBuilderOptions = {} ) => { const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { response, maker = convergence.identity().publicKey } = params; + const { response, rfq } = params; + + const responseModel = + response instanceof PublicKey + ? await convergence.rfqs().findResponseByAddress({ address: response }) + : response; + const rfqModel = + rfq ?? + (await convergence.rfqs().findRfqByAddress({ address: responseModel.rfq })); + + if ( + responseModel.model !== 'escrowResponse' || + rfqModel.model !== 'escrowRfq' + ) { + throw new Error('Response is not settled as an escrow!'); + } const dao = convergence.identity().publicKey; const rfqProgram = convergence.programs().getRfq(programs); const anchorRemainingAccounts: AccountMeta[] = []; - const responseModel = await convergence - .rfqs() - .findResponseByAddress({ address: response }); - - const rfqModel = await convergence - .rfqs() - .findRfqByAddress({ address: responseModel.rfq }); - for (let i = 0; i < responseModel.legPreparationsInitializedBy.length; i++) { const leg = rfqModel.legs[i]; const firstToPrepare = @@ -233,10 +281,11 @@ export const cleanUpResponseBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCleanUpResponseInstruction( { - maker, + maker: responseModel.maker, protocol: convergence.protocol().pdas().protocol(), rfq: responseModel.rfq, response: responseModel.address, @@ -248,3 +297,55 @@ export const cleanUpResponseBuilder = async ( key: 'cleanUpResponses', }); }; + +export type CleanUpPrintTradeResponseBuilderParams = { + response: PublicKey | PrintTradeResponse; + rfq?: PrintTradeRfq; +}; + +export const cleanUpPrintTradeResponseBuilder = async ( + convergence: Convergence, + params: CleanUpPrintTradeResponseBuilderParams, + options: TransactionBuilderOptions = {} +) => { + const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; + const { response, rfq } = params; + + const responseModel = + response instanceof PublicKey + ? await convergence.rfqs().findResponseByAddress({ address: response }) + : response; + const rfqModel = + rfq ?? + (await convergence.rfqs().findRfqByAddress({ address: responseModel.rfq })); + + if ( + responseModel.model !== 'printTradeResponse' || + rfqModel.model !== 'printTradeRfq' + ) { + throw new Error('Response is not settled as a print trade!'); + } + + const rfqProgram = convergence.programs().getRfq(programs); + const remainingAccounts = prependWithProviderProgram( + rfqModel.printTrade, + await rfqModel.printTrade.getCleanUpAccounts(rfqModel, responseModel) + ); + + return TransactionBuilder.make() + .setFeePayer(payer) + .add({ + instruction: createCleanUpResponseInstruction( + { + maker: responseModel.maker, + protocol: convergence.protocol().pdas().protocol(), + rfq: responseModel.rfq, + response: responseModel.address, + anchorRemainingAccounts: remainingAccounts, + }, + rfqProgram.address + ), + signers: [], + key: 'cleanUpResponses', + }); +}; diff --git a/packages/js/src/plugins/rfqModule/operations/cleanUpResponseLegs.ts b/packages/js/src/plugins/rfqModule/operations/cleanUpResponseLegs.ts index d5c4bd846..f4ce81798 100644 --- a/packages/js/src/plugins/rfqModule/operations/cleanUpResponseLegs.ts +++ b/packages/js/src/plugins/rfqModule/operations/cleanUpResponseLegs.ts @@ -1,4 +1,4 @@ -import { createCleanUpResponseLegsInstruction } from '@convergence-rfq/rfq'; +import { createCleanUpResponseEscrowLegsInstruction } from '@convergence-rfq/rfq'; import { PublicKey, AccountMeta } from '@solana/web3.js'; import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; @@ -158,6 +158,13 @@ export const cleanUpResponseLegsBuilder = async ( .rfqs() .findResponseByAddress({ address: response }); + if ( + responseModel.model !== 'escrowResponse' || + rfqModel.model !== 'escrowRfq' + ) { + throw new Error('Response is not settled as an escrow!'); + } + const initializedLegs = responseModel.legPreparationsInitializedBy.length; const anchorRemainingAccounts: AccountMeta[] = []; for (let i = initializedLegs - legAmountToClear; i < initializedLegs; i++) { @@ -206,8 +213,9 @@ export const cleanUpResponseLegsBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ - instruction: createCleanUpResponseLegsInstruction( + instruction: createCleanUpResponseEscrowLegsInstruction( { protocol: protocol.address, rfq, diff --git a/packages/js/src/plugins/rfqModule/operations/cleanUpRfq.ts b/packages/js/src/plugins/rfqModule/operations/cleanUpRfq.ts index 13e832568..74903853c 100644 --- a/packages/js/src/plugins/rfqModule/operations/cleanUpRfq.ts +++ b/packages/js/src/plugins/rfqModule/operations/cleanUpRfq.ts @@ -13,7 +13,7 @@ import { TransactionBuilder, TransactionBuilderOptions, } from '../../../utils/TransactionBuilder'; - +import { rfqProgram } from '../program'; const Key = 'CleanUpRfqOperation' as const; /** @@ -131,14 +131,25 @@ export const cleanUpRfqBuilder = async ( ): Promise => { const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; const { taker = convergence.identity().publicKey, rfq } = params; + const rfqModel = await convergence.rfqs().findRfqByAddress({ + address: rfq, + }); + + const defaultPubkey = PublicKey.default; + const whitelist = + rfqModel.whitelist.toBase58() !== defaultPubkey.toBase58() + ? rfqModel.whitelist + : rfqProgram.address; return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCleanUpRfqInstruction( { taker, protocol: convergence.protocol().pdas().protocol(), rfq, + whitelist, }, convergence.programs().getRfq(programs).address ), diff --git a/packages/js/src/plugins/rfqModule/operations/confirmResponse.ts b/packages/js/src/plugins/rfqModule/operations/confirmResponse.ts index e0ec2d5db..c5f8b2f28 100644 --- a/packages/js/src/plugins/rfqModule/operations/confirmResponse.ts +++ b/packages/js/src/plugins/rfqModule/operations/confirmResponse.ts @@ -1,5 +1,5 @@ import { createConfirmResponseInstruction } from '@convergence-rfq/rfq'; -import { PublicKey, AccountMeta, ComputeBudgetProgram } from '@solana/web3.js'; +import { PublicKey, ComputeBudgetProgram } from '@solana/web3.js'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; import { Convergence } from '../../../Convergence'; @@ -200,36 +200,6 @@ export const confirmResponseBuilder = async ( programs, }); - const baseAssetIndexValuesSet: Set = new Set(); - const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); - for (const leg of rfqModel.legs) { - baseAssetIndexValuesSet.add(leg.getBaseAssetIndex().value); - } - - const baseAssetAccounts: AccountMeta[] = []; - const oracleAccounts: AccountMeta[] = []; - const baseAssetIndexValues = Array.from(baseAssetIndexValuesSet); - for (const index of baseAssetIndexValues) { - const baseAsset = convergence.protocol().pdas().baseAsset({ index }); - baseAssetAccounts.push({ - pubkey: baseAsset, - isSigner: false, - isWritable: false, - }); - - const baseAssetModel = await convergence - .protocol() - .findBaseAssetByAddress({ address: baseAsset }); - - if (baseAssetModel.priceOracle.address) { - oracleAccounts.push({ - pubkey: baseAssetModel.priceOracle.address, - isSigner: false, - isWritable: false, - }); - } - } - return TransactionBuilder.make() .setFeePayer(payer) .add( @@ -250,15 +220,6 @@ export const confirmResponseBuilder = async ( taker: taker.publicKey, protocol: convergence.protocol().pdas().protocol(), riskEngine: convergence.programs().getRiskEngine(programs).address, - anchorRemainingAccounts: [ - { - pubkey: convergence.riskEngine().pdas().config(), - isSigner: false, - isWritable: false, - }, - ...baseAssetAccounts, - ...oracleAccounts, - ], }, { side: toSolitaQuoteSide(side), diff --git a/packages/js/src/plugins/rfqModule/operations/createAndFinalizeRfqConstruction.ts b/packages/js/src/plugins/rfqModule/operations/createAndFinalizeRfqConstruction.ts index 53fc66974..b9ccceb58 100644 --- a/packages/js/src/plugins/rfqModule/operations/createAndFinalizeRfqConstruction.ts +++ b/packages/js/src/plugins/rfqModule/operations/createAndFinalizeRfqConstruction.ts @@ -1,5 +1,5 @@ -import { PublicKey } from '@solana/web3.js'; -import * as anchor from '@project-serum/anchor'; +import { Keypair, PublicKey } from '@solana/web3.js'; +import * as anchor from '@coral-xyz/anchor'; import { BN } from 'bn.js'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; @@ -22,13 +22,15 @@ import { import { LegInstrument, QuoteInstrument, - toQuote, + serializeInstrumentAsSolitaLeg, + instrumentToQuote, } from '../../../plugins/instrumentModule'; import { OrderType } from '../models/OrderType'; import { createRfqBuilder } from './createRfq'; import { finalizeRfqConstructionBuilder } from './finalizeRfqConstruction'; import { addLegsToRfqBuilder } from './addLegsToRfq'; import { InstructionUniquenessTracker } from '@/utils/classes'; +import { createWhitelistBuilder } from '@/plugins/whitelistModule'; const Key = 'CreateAndFinalizeRfqConstructionOperation' as const; @@ -132,8 +134,8 @@ export type CreateAndFinalizeRfqConstructionInput = { /** Optional address of the risk engine program account. */ riskEngine?: PublicKey; - /** Optional RFQ whitelist Address . */ - whitelistAddress?: PublicKey; + /** Optional counterparties PubkeyList to create a whitelist. */ + counterParties?: PublicKey[]; }; /** @@ -167,14 +169,31 @@ export const createAndFinalizeRfqConstructionOperationHandler: OperationHandler< quoteAsset, activeWindow = 5_000, settlingWindow = 1_000, - whitelistAddress, + counterParties = [], } = operation.input; + let whitelistAccount = null; + let createWhitelistTxBuilder: TransactionBuilder | null = null; + if (counterParties.length > 0) { + whitelistAccount = Keypair.generate(); + createWhitelistTxBuilder = await createWhitelistBuilder( + convergence, + { + creator: taker.publicKey, + whitelist: counterParties, + whitelistKeypair: whitelistAccount, + }, + scope + ); + } const payer = convergence.rpc().getDefaultFeePayer(); const recentTimestamp = new BN(Math.floor(Date.now() / 1_000)); + const rfqPreparationTxBuilderArray: TransactionBuilder[] = []; const ixTracker = new InstructionUniquenessTracker([]); for (const ins of instruments) { - const rfqPreparationIxs = await ins.getPreparationsBeforeRfqCreation(); + const rfqPreparationIxs = await ins.getPreparationsBeforeRfqCreation( + taker.publicKey + ); if (rfqPreparationIxs.length === 0) continue; const rfqPreparationTxBuilder = TransactionBuilder.make().setFeePayer(payer); @@ -189,7 +208,10 @@ export const createAndFinalizeRfqConstructionOperationHandler: OperationHandler< if (rfqPreparationTxBuilder.getInstructionCount() > 0) rfqPreparationTxBuilderArray.push(rfqPreparationTxBuilder); } - const expectedLegsHash = calculateExpectedLegsHash(instruments); + const serializedLegs = instruments.map((instruments) => + serializeInstrumentAsSolitaLeg(instruments) + ); + const expectedLegsHash = calculateExpectedLegsHash(serializedLegs); const rfqPda = convergence .rfqs() @@ -197,8 +219,9 @@ export const createAndFinalizeRfqConstructionOperationHandler: OperationHandler< .rfq({ taker: taker.publicKey, legsHash: Buffer.from(expectedLegsHash), + printTradeProvider: null, orderType, - quoteAsset: toQuote(quoteAsset), + quoteAsset: instrumentToQuote(quoteAsset), fixedSize, activeWindow, settlingWindow, @@ -218,7 +241,9 @@ export const createAndFinalizeRfqConstructionOperationHandler: OperationHandler< fixedSize, expectedLegsHash, recentTimestamp, - whitelistAddress, + whitelistAccount: whitelistAccount + ? whitelistAccount.publicKey + : null, }, scope ); @@ -232,7 +257,11 @@ export const createAndFinalizeRfqConstructionOperationHandler: OperationHandler< const rfqPreparationTxs = rfqPreparationTxBuilderArray.map((b) => b.toTransaction(lastValidBlockHeight) ); - + if (whitelistAccount && createWhitelistTxBuilder) { + const createWhitelistTx = + createWhitelistTxBuilder.toTransaction(lastValidBlockHeight); + rfqPreparationTxs.push(createWhitelistTx); + } const createRfqTx = createRfqTxBuilder.toTransaction(lastValidBlockHeight); @@ -253,6 +282,18 @@ export const createAndFinalizeRfqConstructionOperationHandler: OperationHandler< finalizeRfqTxs, ]); + if (whitelistAccount) { + const userSignedCreateWhitelistTx = rfqPreparationSignedTxs.pop(); + if (userSignedCreateWhitelistTx) { + const whitelistkeypairSignedCreateWhitelistTx = await convergence + .rpc() + .signTransaction(userSignedCreateWhitelistTx, [ + whitelistAccount as Signer, + ]); + rfqPreparationSignedTxs.push(whitelistkeypairSignedCreateWhitelistTx); + } + } + for (const signedTx of rfqPreparationSignedTxs) { await convergence .rpc() @@ -311,6 +352,7 @@ export type CreateAndFinalizeRfqConstructionBuilderParams = expectedLegsHash: Uint8Array; recentTimestamp: anchor.BN; rfq: PublicKey; + whitelistAccount: PublicKey | null; }; export type CreateAndFinalizeRfqConstructionBuilderResult = { @@ -328,7 +370,9 @@ export const createAndFinalizeRfqConstructionBuilder = async ( const { createRfqTxBuilder, remainingLegsToAdd } = await createRfqBuilder( convergence, - { ...params }, + { + ...params, + }, options ); diff --git a/packages/js/src/plugins/rfqModule/operations/createPrintTradeRfq.ts b/packages/js/src/plugins/rfqModule/operations/createPrintTradeRfq.ts new file mode 100644 index 000000000..eba0815a2 --- /dev/null +++ b/packages/js/src/plugins/rfqModule/operations/createPrintTradeRfq.ts @@ -0,0 +1,406 @@ +import { + createCreateRfqInstruction, + createValidateRfqByPrintTradeProviderInstruction, +} from '@convergence-rfq/rfq'; +import { Keypair, PublicKey, Transaction } from '@solana/web3.js'; +import * as anchor from '@coral-xyz/anchor'; + +import { BN } from 'bn.js'; +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; +import { + assertPrintTradeRfq, + FixedSize, + PrintTradeRfq, + toSolitaFixedSize, +} from '../models'; +import { + calculateExpectedLegsHash, + calculateExpectedLegsSize, + legsToBaseAssetAccounts, +} from '../helpers'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { + makeConfirmOptionsFinalizedOnMainnet, + Operation, + OperationHandler, + OperationScope, + useOperation, + Signer, +} from '../../../types'; +import { Convergence } from '../../../Convergence'; +import { OrderType, toSolitaOrderType } from '../models/OrderType'; +import { finalizeRfqConstructionBuilder } from './finalizeRfqConstruction'; +import { + PrintTrade, + serializePrintTradeAsSolitaLeg, + printTradeToSolitaLeg, + printTradetoSolitaQuote, + prependWithProviderProgram, +} from '@/plugins/printTradeModule'; +import { createWhitelistBuilder } from '@/plugins/whitelistModule'; + +const Key = 'CreatePrintTradeRfqOperation' as const; + +export const createPrintTradeRfqOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type CreatePrintTradeRfqOperation = Operation< + typeof Key, + CreatePrintTradeRfqInput, + CreatePrintTradeRfqOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type CreatePrintTradeRfqInput = { + /** + * The taker of the Rfq to create. + * + * @defaultValue `convergence.identity().publicKey` + */ + taker?: Signer; + + printTrade: PrintTrade; + + /** The type of order. */ + orderType: OrderType; + + /** + * The type of the Rfq, specifying whether we fix the number of + * base assets to be exchanged, the number of quote assets, + * or neither. + */ + fixedSize: FixedSize; + + /** + * Active window (in seconds). + */ + activeWindow: number; + + /** + * Settling window (in seconds). + */ + settlingWindow: number; + + /** Optional counterparties PubkeyList to create a whitelist. */ + counterParties?: PublicKey[]; +}; + +/** + * @group Operations + * @category Outputs + */ +export type CreatePrintTradeRfqOutput = { + /** The blockchain response from sending and confirming the transaction. */ + response: SendAndConfirmTransactionResponse; + + /** The newly created Rfq. */ + rfq: PrintTradeRfq; +}; + +/** + * @group Operations + * @category Handlers + */ +export const createPrintTradeRfqOperationHandler: OperationHandler = + { + handle: async ( + operation: CreatePrintTradeRfqOperation, + convergence: Convergence, + scope: OperationScope + ) => { + const { + taker = convergence.identity(), + orderType, + printTrade, + fixedSize, + activeWindow, + settlingWindow, + counterParties = [], + } = operation.input; + const recentTimestamp = new BN(Math.floor(Date.now() / 1_000)); + const serializedLegs = printTrade + .getLegs() + .map((leg) => serializePrintTradeAsSolitaLeg(leg)); + const expectedLegsHash = calculateExpectedLegsHash(serializedLegs); + let createWhitelistTxBuilder: TransactionBuilder | null = null; + let whitelistAccount = null; + if (counterParties.length > 0) { + whitelistAccount = Keypair.generate(); + createWhitelistTxBuilder = await createWhitelistBuilder( + convergence, + { + creator: taker.publicKey, + whitelist: counterParties, + whitelistKeypair: whitelistAccount, + }, + scope + ); + } + const rfqPda = convergence + .rfqs() + .pdas() + .rfq({ + taker: taker.publicKey, + legsHash: Buffer.from(expectedLegsHash), + printTradeProvider: printTrade.getPrintTradeProviderProgramId(), + orderType, + quoteAsset: printTradetoSolitaQuote(printTrade.getQuote()), + fixedSize, + activeWindow, + settlingWindow, + recentTimestamp, + }); + + const createPrintTradeRfqBuilder = + await createPrintTradeFullFlowRfqBuilder( + convergence, + { + ...operation.input, + rfq: rfqPda, + fixedSize, + activeWindow, + settlingWindow, + expectedLegsHash, + recentTimestamp, + whitelistAccount: whitelistAccount + ? whitelistAccount.publicKey + : null, + }, + scope + ); + scope.throwIfCanceled(); + + const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( + convergence, + scope.confirmOptions + ); + const txs: Transaction[] = []; + const lastValidBlockHeight = await convergence.rpc().getLatestBlockhash(); + + if (whitelistAccount && createWhitelistTxBuilder) { + const createWhitelistTx = + createWhitelistTxBuilder.toTransaction(lastValidBlockHeight); + txs.push(createWhitelistTx); + } + txs.push(createPrintTradeRfqBuilder.toTransaction(lastValidBlockHeight)); + + const signedTxs = await convergence.identity().signAllTransactions(txs); + if (whitelistAccount) { + if (signedTxs.length === 2) { + const whitelistkeypairSignedCreateWhitelistTx = await convergence + .rpc() + .signTransaction(signedTxs[0], [whitelistAccount as Signer]); + signedTxs[0] = whitelistkeypairSignedCreateWhitelistTx; + } + } + let response: SendAndConfirmTransactionResponse; + switch (signedTxs.length) { + case 1: + response = await convergence + .rpc() + .serializeAndSendTransaction( + signedTxs[0], + lastValidBlockHeight, + confirmOptions + ); + break; + case 2: + await convergence + .rpc() + .serializeAndSendTransaction( + signedTxs[0], + lastValidBlockHeight, + confirmOptions + ); + response = await convergence + .rpc() + .serializeAndSendTransaction( + signedTxs[1], + lastValidBlockHeight, + confirmOptions + ); + break; + default: + throw new Error('Unexpected number of transactions'); + } + + scope.throwIfCanceled(); + + const rfq = await convergence + .rfqs() + .findRfqByAddress({ address: rfqPda }); + assertPrintTradeRfq(rfq); + + return { response, rfq }; + }, + }; + +/** + * @group Transaction Builders + * @category Inputs + */ +export type CreatePrintTradeRfqBuilderParams = CreatePrintTradeRfqInput & { + rfq: PublicKey; + + expectedLegsHash: Uint8Array; + + recentTimestamp: anchor.BN; + + whitelistAccount: PublicKey | null; +}; + +export const createPrintTradeFullFlowRfqBuilder = async ( + convergence: Convergence, + params: CreatePrintTradeRfqBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { payer = convergence.rpc().getDefaultFeePayer() } = options; + const { rfq, printTrade } = params; + + const createRfqBuilder = await createPrintTradeRfqBuilder( + convergence, + params, + options + ); + const validatePrintTradeBuilder = + await validateRfqByPrintTradeProviderBuilder(convergence, params, options); + const finalizeRfqConstruction = await finalizeRfqConstructionBuilder( + convergence, + { ...params, legs: printTrade.getLegs() }, + options + ); + + return TransactionBuilder.make() + .setContext({ + rfq, + }) + .setFeePayer(payer) + .add(createRfqBuilder, validatePrintTradeBuilder, finalizeRfqConstruction); +}; + +/** + * Creates a new Rfq. + * + * ```ts + * const transactionBuilder = await convergence + * .rfqs() + * .builders() + * .create({}); + * ``` + * + * @group Transaction Builders + * @category Constructors + */ +export const createPrintTradeRfqBuilder = async ( + convergence: Convergence, + params: CreatePrintTradeRfqBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; + + const { + taker = convergence.identity(), + printTrade, + rfq, + orderType, + fixedSize, + activeWindow, + settlingWindow, + recentTimestamp, + expectedLegsHash, + whitelistAccount, + } = params; + + const legs = printTrade.getLegs(); + const solitaLegs = legs.map((leg) => printTradeToSolitaLeg(leg)); + const quote = printTrade.getQuote(); + const serializedLegs = legs.map((leg) => serializePrintTradeAsSolitaLeg(leg)); + const expectedLegsSize = calculateExpectedLegsSize(serializedLegs); + + const systemProgram = convergence.programs().getSystem(programs); + const rfqProgram = convergence.programs().getRfq(programs); + + const baseAssetAccounts = legsToBaseAssetAccounts(convergence, solitaLegs); + let whitelistAccountToPass = rfqProgram.address; + if (whitelistAccount) { + whitelistAccountToPass = whitelistAccount; + } + return TransactionBuilder.make() + .setFeePayer(payer) + .setContext({ + rfq, + }) + .add({ + instruction: createCreateRfqInstruction( + { + taker: taker.publicKey, + protocol: convergence.protocol().pdas().protocol(), + rfq, + systemProgram: systemProgram.address, + whitelist: whitelistAccountToPass, + anchorRemainingAccounts: [...baseAssetAccounts], + }, + { + printTradeProvider: printTrade.getPrintTradeProviderProgramId(), + expectedLegsSize, + expectedLegsHash: Array.from(expectedLegsHash), + legs: solitaLegs, + orderType: toSolitaOrderType(orderType), + quoteAsset: printTradetoSolitaQuote(quote), + fixedSize: toSolitaFixedSize(fixedSize, quote.getDecimals()), + activeWindow, + settlingWindow, + recentTimestamp, + }, + rfqProgram.address + ), + signers: [taker], + key: 'createRfq', + }); +}; + +export const validateRfqByPrintTradeProviderBuilder = async ( + convergence: Convergence, + params: CreatePrintTradeRfqBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; + + const { taker = convergence.identity(), printTrade, rfq } = params; + + const rfqProgram = convergence.programs().getRfq(programs); + + const validationAccounts = prependWithProviderProgram( + printTrade, + await printTrade.getValidationAccounts() + ); + + return TransactionBuilder.make() + .setFeePayer(payer) + .setContext({ + rfq, + }) + .add({ + instruction: createValidateRfqByPrintTradeProviderInstruction( + { + taker: taker.publicKey, + protocol: convergence.protocol().pdas().protocol(), + rfq, + anchorRemainingAccounts: validationAccounts, + }, + rfqProgram.address + ), + signers: [taker], + key: 'validateRfqByPrintTradeProvider', + }); +}; diff --git a/packages/js/src/plugins/rfqModule/operations/createRfq.ts b/packages/js/src/plugins/rfqModule/operations/createRfq.ts index d397cadb7..82521f73b 100644 --- a/packages/js/src/plugins/rfqModule/operations/createRfq.ts +++ b/packages/js/src/plugins/rfqModule/operations/createRfq.ts @@ -1,6 +1,6 @@ import { createCreateRfqInstruction } from '@convergence-rfq/rfq'; -import { PublicKey, AccountMeta } from '@solana/web3.js'; -import * as anchor from '@project-serum/anchor'; +import { PublicKey, AccountMeta, Keypair } from '@solana/web3.js'; +import * as anchor from '@coral-xyz/anchor'; import { BN } from 'bn.js'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; @@ -27,12 +27,14 @@ import { import { Convergence } from '../../../Convergence'; import { LegInstrument, - // LegInstrumentInputData, QuoteInstrument, - toQuote, + serializeInstrumentAsSolitaLeg, + instrumentToQuote, + instrumentToSolitaLeg, } from '../../../plugins/instrumentModule'; import { OrderType, toSolitaOrderType } from '../models/OrderType'; import { InstructionUniquenessTracker } from '@/utils/classes'; +import { createWhitelistBuilder } from '@/plugins/whitelistModule'; const Key = 'CreateRfqOperation' as const; @@ -127,8 +129,8 @@ export type CreateRfqInput = { */ expectedLegsHash?: Uint8Array; - /** Optional RFQ whitelist Address . */ - whitelistAddress?: PublicKey; + /** Optional counterparties PubkeyList to create a whitelist. */ + counterParties?: PublicKey[]; }; /** @@ -161,15 +163,34 @@ export const createRfqOperationHandler: OperationHandler = { fixedSize, activeWindow = 5_000, settlingWindow = 1_000, + counterParties = [], } = operation.input; let { expectedLegsHash } = operation.input; - const { whitelistAddress } = operation.input; const payer = convergence.rpc().getDefaultFeePayer(); const recentTimestamp = new BN(Math.floor(Date.now() / 1_000)); + let whitelistAccount = null; + const serializedLegs = instruments.map((instrument) => + serializeInstrumentAsSolitaLeg(instrument) + ); + let createWhitelistTxBuilder: TransactionBuilder | null = null; + if (counterParties.length > 0) { + whitelistAccount = Keypair.generate(); + createWhitelistTxBuilder = await createWhitelistBuilder( + convergence, + { + creator: taker.publicKey, + whitelist: counterParties, + whitelistKeypair: whitelistAccount, + }, + scope + ); + } const rfqPreparationTxBuilderArray: TransactionBuilder[] = []; const ixTracker = new InstructionUniquenessTracker([]); for (const ins of instruments) { - const rfqPreparationIxs = await ins.getPreparationsBeforeRfqCreation(); + const rfqPreparationIxs = await ins.getPreparationsBeforeRfqCreation( + taker.publicKey + ); if (rfqPreparationIxs.length === 0) continue; const rfqPreparationTxBuilder = TransactionBuilder.make().setFeePayer(payer); @@ -185,7 +206,7 @@ export const createRfqOperationHandler: OperationHandler = { rfqPreparationTxBuilderArray.push(rfqPreparationTxBuilder); } expectedLegsHash = - expectedLegsHash ?? calculateExpectedLegsHash(instruments); + expectedLegsHash ?? calculateExpectedLegsHash(serializedLegs); const rfqPda = convergence .rfqs() @@ -193,8 +214,9 @@ export const createRfqOperationHandler: OperationHandler = { .rfq({ taker: taker.publicKey, legsHash: Buffer.from(expectedLegsHash), + printTradeProvider: null, orderType, - quoteAsset: toQuote(quoteAsset), + quoteAsset: instrumentToQuote(quoteAsset), fixedSize, activeWindow, settlingWindow, @@ -212,7 +234,7 @@ export const createRfqOperationHandler: OperationHandler = { settlingWindow, expectedLegsHash, recentTimestamp, - whitelistAddress, + whitelistAccount: whitelistAccount ? whitelistAccount.publicKey : null, }, scope ); @@ -229,11 +251,29 @@ export const createRfqOperationHandler: OperationHandler = { b.toTransaction(lastValidBlockHeight) ); + if (whitelistAccount && createWhitelistTxBuilder) { + const createWhitelistTx = + createWhitelistTxBuilder.toTransaction(lastValidBlockHeight); + rfqPreparationTxs.push(createWhitelistTx); + } const createRfqTx = createRfqTxBuilder.toTransaction(lastValidBlockHeight); const [rfqPreparationSignedTxs, [createRfqSignedTx]] = await convergence .identity() .signTransactionMatrix(rfqPreparationTxs, [createRfqTx]); + + if (whitelistAccount) { + const userSignedCreateWhitelistTx = rfqPreparationSignedTxs.pop(); + if (userSignedCreateWhitelistTx) { + const whitelistkeypairSignedCreateWhitelistTx = await convergence + .rpc() + .signTransaction(userSignedCreateWhitelistTx, [ + whitelistAccount as Signer, + ]); + rfqPreparationSignedTxs.push(whitelistkeypairSignedCreateWhitelistTx); + } + } + for (const signedTx of rfqPreparationSignedTxs) { await convergence .rpc() @@ -271,6 +311,8 @@ export type CreateRfqBuilderParams = CreateRfqInput & { expectedLegsHash: Uint8Array; recentTimestamp: anchor.BN; + + whitelistAccount: PublicKey | null; }; /** @@ -310,15 +352,20 @@ export const createRfqBuilder = async ( recentTimestamp, expectedLegsHash, instruments, + whitelistAccount, } = params; let { expectedLegsSize } = params; - const { whitelistAddress = null } = params; + const solitaLegs = instruments.map((instrument) => + instrumentToSolitaLeg(instrument) + ); + const serializedLegs = instruments.map((instrument) => + serializeInstrumentAsSolitaLeg(instrument) + ); + expectedLegsSize = + expectedLegsSize ?? calculateExpectedLegsSize(serializedLegs); const legs = instrumentsToLegs(instruments); - const expectedLegsSizeValue = calculateExpectedLegsSize(instruments); - expectedLegsSize = expectedLegsSize ?? expectedLegsSizeValue; - const systemProgram = convergence.programs().getSystem(programs); const rfqProgram = convergence.programs().getRfq(programs); const spotInstrumentProgram = convergence @@ -335,26 +382,31 @@ export const createRfqBuilder = async ( pubkey: convergence .rfqs() .pdas() - .quote({ quoteAsset: toQuote(quoteAsset) }), + .quote({ quoteAsset: instrumentToQuote(quoteAsset) }), isSigner: false, isWritable: false, }, ]; - let baseAssetAccounts = legsToBaseAssetAccounts(convergence, legs); + let baseAssetAccounts = legsToBaseAssetAccounts(convergence, solitaLegs); let legAccounts = await instrumentsToLegAccounts(instruments); - + let whitelistAccountToPass = rfqProgram.address; + if (whitelistAccount) { + whitelistAccountToPass = whitelistAccount; + } let rfqBuilder = TransactionBuilder.make() .setFeePayer(payer) .setContext({ rfq, }) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCreateRfqInstruction( { taker: taker.publicKey, protocol: convergence.protocol().pdas().protocol(), rfq, + whitelist: whitelistAccountToPass, systemProgram: systemProgram.address, anchorRemainingAccounts: [ ...quoteAccounts, @@ -363,16 +415,16 @@ export const createRfqBuilder = async ( ], }, { + printTradeProvider: null, expectedLegsSize, expectedLegsHash: Array.from(expectedLegsHash), - legs, + legs: solitaLegs, orderType: toSolitaOrderType(orderType), - quoteAsset: toQuote(quoteAsset), + quoteAsset: instrumentToQuote(quoteAsset), fixedSize: toSolitaFixedSize(fixedSize, quoteAsset.getDecimals()), activeWindow, settlingWindow, recentTimestamp, - whitelist: whitelistAddress, }, rfqProgram.address ), @@ -393,12 +445,14 @@ export const createRfqBuilder = async ( .setContext({ rfq, }) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCreateRfqInstruction( { taker: taker.publicKey, protocol: convergence.protocol().pdas().protocol(), rfq, + whitelist: whitelistAccountToPass, systemProgram: systemProgram.address, anchorRemainingAccounts: [ ...quoteAccounts, @@ -407,16 +461,16 @@ export const createRfqBuilder = async ( ], }, { + printTradeProvider: null, expectedLegsSize, expectedLegsHash: Array.from(expectedLegsHash), legs: legsToAdd, orderType: toSolitaOrderType(orderType), - quoteAsset: toQuote(quoteAsset), + quoteAsset: instrumentToQuote(quoteAsset), fixedSize: toSolitaFixedSize(fixedSize, quoteAsset.getDecimals()), activeWindow, settlingWindow, recentTimestamp, - whitelist: whitelistAddress, }, rfqProgram.address ), diff --git a/packages/js/src/plugins/rfqModule/operations/finalizeRfqConstruction.ts b/packages/js/src/plugins/rfqModule/operations/finalizeRfqConstruction.ts index 5e43011c0..d287c82ad 100644 --- a/packages/js/src/plugins/rfqModule/operations/finalizeRfqConstruction.ts +++ b/packages/js/src/plugins/rfqModule/operations/finalizeRfqConstruction.ts @@ -1,5 +1,5 @@ import { createFinalizeRfqConstructionInstruction } from '@convergence-rfq/rfq'; -import { PublicKey, AccountMeta, ComputeBudgetProgram } from '@solana/web3.js'; +import { PublicKey, ComputeBudgetProgram } from '@solana/web3.js'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; import { assertRfq, Rfq } from '../models'; @@ -17,6 +17,7 @@ import { } from '../../../types'; import { Convergence } from '../../../Convergence'; import { LegInstrument } from '@/plugins/instrumentModule'; +import { PrintTradeLeg } from '@/plugins/printTradeModule'; const Key = 'FinalizeRfqConstructionOperation' as const; @@ -86,7 +87,7 @@ export type FinalizeRfqConstructionInput = { * Is passed automatically when `createAndFinalize` * is called. Else the legs are extracted from the rfq account. */ - legs?: LegInstrument[]; + legs?: LegInstrument[] | PrintTradeLeg[]; }; /** @@ -196,88 +197,33 @@ export const finalizeRfqConstructionBuilder = async ( collateralInfo = collateralInfo ?? collateralInfoPda; collateralToken = collateralToken ?? collateralTokenPda; - const anchorRemainingAccounts: AccountMeta[] = []; - const protocol = convergence.protocol().pdas().protocol(); - const [config] = PublicKey.findProgramAddressSync( - [Buffer.from('config')], - riskEngineProgram.address - ); - - const configAccount: AccountMeta = { - pubkey: config, - isSigner: false, - isWritable: false, - }; - - const oracleAccounts: AccountMeta[] = []; - - const baseAssetAccounts: AccountMeta[] = []; - const baseAssetIndexValuesSet: Set = new Set(); - - for (const leg of legs) { - baseAssetIndexValuesSet.add(leg.getBaseAssetIndex().value); - } - - const baseAssetIndexValues = Array.from(baseAssetIndexValuesSet); - - for (const index of baseAssetIndexValues) { - const baseAsset = convergence.protocol().pdas().baseAsset({ index }); - const baseAssetAccount: AccountMeta = { - pubkey: baseAsset, - isSigner: false, - isWritable: false, - }; - - baseAssetAccounts.push(baseAssetAccount); - - const baseAssetModel = await convergence - .protocol() - .findBaseAssetByAddress({ address: baseAsset }); - - if (baseAssetModel.priceOracle.address) { - oracleAccounts.push({ - pubkey: baseAssetModel.priceOracle.address, - isSigner: false, - isWritable: false, - }); - } - } - - anchorRemainingAccounts.push( - configAccount, - ...baseAssetAccounts, - ...oracleAccounts - ); - return TransactionBuilder.make() .setFeePayer(payer) .setContext({ rfq, }) - .add( - { - instruction: ComputeBudgetProgram.setComputeUnitLimit({ - units: 1400000, - }), - signers: [], - }, - { - instruction: createFinalizeRfqConstructionInstruction( - { - taker: taker.publicKey, - protocol, - rfq, - collateralInfo, - collateralToken, - riskEngine, - anchorRemainingAccounts, - }, - rfqProgram.address - ), - signers: [taker], - key: 'finalizeRfqConstruction', - } - ); + .add({ + instruction: ComputeBudgetProgram.setComputeUnitLimit({ + units: 1400000, + }), + signers: [], + }) + .addTxPriorityFeeIx(convergence) + .add({ + instruction: createFinalizeRfqConstructionInstruction( + { + taker: taker.publicKey, + protocol, + rfq, + collateralInfo, + collateralToken, + riskEngine, + }, + rfqProgram.address + ), + signers: [taker], + key: 'finalizeRfqConstruction', + }); }; diff --git a/packages/js/src/plugins/rfqModule/operations/findResponseByAddress.ts b/packages/js/src/plugins/rfqModule/operations/findResponseByAddress.ts index 453046e51..51b3252f9 100644 --- a/packages/js/src/plugins/rfqModule/operations/findResponseByAddress.ts +++ b/packages/js/src/plugins/rfqModule/operations/findResponseByAddress.ts @@ -75,7 +75,7 @@ export const findResponseByAddressOperationHandler: OperationHandler toResponse( - responseAccount, - collateralMint.decimals, - rfq.quoteAsset.getDecimals() - )) + .then((rfq) => + toResponse(responseAccount, collateralMint.decimals, rfq) + ) ); } } diff --git a/packages/js/src/plugins/rfqModule/operations/findResponsesByRfq.ts b/packages/js/src/plugins/rfqModule/operations/findResponsesByRfq.ts index 243cd6631..cdffa3cfe 100644 --- a/packages/js/src/plugins/rfqModule/operations/findResponsesByRfq.ts +++ b/packages/js/src/plugins/rfqModule/operations/findResponsesByRfq.ts @@ -77,7 +77,7 @@ export const findResponsesByRfqOperationHandler: OperationHandler 0 || - response.takerCollateralLocked > 0 - ) - return 'UnlockCollateral'; - if ( - response.makerCollateralLocked === 0 && - response.takerCollateralLocked === 0 - ) - return 'Cleanup'; + return 'Cleanup'; case 'SettlingPreparations': case 'OnlyMakerPrepared': case 'OnlyTakerPrepared': case 'ReadyForSettling': return 'Settle'; - case 'MakerDefaulted': - case 'TakerDefaulted': - return 'Settle One Party Defaulted'; - case 'BothDefaulted': - return 'Settle Both Party Defaulted'; case 'Rejected': return null; } @@ -222,25 +200,10 @@ const getResponseAction = ( case 'OnlyTakerPrepared': case 'ReadyForSettling': return 'Settle'; - case 'MakerDefaulted': - return 'Settle One Party Defaulted'; - case 'TakerDefaulted': - return 'Settle One Party Defaulted'; - case 'BothDefaulted': - return 'Settle Both Party Defaulted'; case 'Settled': case 'Expired': case 'Cancelled': - if ( - response.takerCollateralLocked > 0 || - response.makerCollateralLocked > 0 - ) - return 'UnlockCollateral'; - if ( - response.takerCollateralLocked === 0 && - response.makerCollateralLocked === 0 - ) - return 'Cleanup'; + return 'Cleanup'; case 'Rejected': return null; } @@ -270,9 +233,17 @@ const getDefautingParty = ( }; const hasMakerPrepared = (response: Response, rfq: Rfq) => { - return response.makerPreparedLegs === rfq.legs.length; + if (response.model === 'escrowResponse') { + return response.makerPreparedLegs === rfq.legs.length; + } + + return response.makerPrepared; }; const hasTakerPrepared = (response: Response, rfq: Rfq) => { - return response.takerPreparedLegs === rfq.legs.length; + if (response.model === 'escrowResponse') { + return response.takerPreparedLegs === rfq.legs.length; + } + + return response.takerPrepared; }; diff --git a/packages/js/src/plugins/rfqModule/operations/index.ts b/packages/js/src/plugins/rfqModule/operations/index.ts index d82acb2ea..af13e8b94 100644 --- a/packages/js/src/plugins/rfqModule/operations/index.ts +++ b/packages/js/src/plugins/rfqModule/operations/index.ts @@ -8,31 +8,24 @@ export * from './cleanUpResponseLegs'; export * from './createAndFinalizeRfqConstruction'; export * from './cleanUpRfq'; export * from './confirmResponse'; +export * from './createPrintTradeRfq'; export * from './createRfq'; export * from './finalizeRfqConstruction'; export * from './findRfqByAddress'; -export * from './partiallySettleLegs'; -export * from './partiallySettleLegsAndSettle'; export * from './partlyRevertSettlementPreparation'; export * from './prepareMoreLegsSettlement'; export * from './prepareSettlement'; export * from './prepareSettlementAndPrepareMoreLegs'; +export * from './preparePrintTradeSettlement'; export * from './respondToRfq'; export * from './findRfqs'; export * from './revertSettlementPreparation'; export * from './settle'; -export * from './settleOnePartyDefault'; -export * from './settleTwoPartyDefault'; -export * from './unlockResponseCollateral'; -export * from './unlockRfqCollateral'; export * from './findResponseByAddress'; export * from './findResponsesByRfq'; export * from './findResponsesByOwner'; export * from './findResponsesByRfq'; export * from './cleanUpRfqs'; export * from './cancelRfqs'; -export * from './unlockResponseCollateral'; -export * from './unlockResponsesCollateral'; -export * from './unlockRfqsCollateral'; export * from './getSettlementResult'; export * from './getResponseStateAndAction'; diff --git a/packages/js/src/plugins/rfqModule/operations/partiallySettleLegs.ts b/packages/js/src/plugins/rfqModule/operations/partiallySettleLegs.ts deleted file mode 100644 index 3e8571e35..000000000 --- a/packages/js/src/plugins/rfqModule/operations/partiallySettleLegs.ts +++ /dev/null @@ -1,235 +0,0 @@ -import { PublicKey, AccountMeta, ComputeBudgetProgram } from '@solana/web3.js'; -import { createPartiallySettleLegsInstruction } from '@convergence-rfq/rfq'; -import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - makeConfirmOptionsFinalizedOnMainnet, -} from '../../../types'; -import { Convergence } from '../../../Convergence'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { InstrumentPdasClient } from '../../instrumentModule'; -import { legToBaseAssetMint } from '@/plugins/instrumentModule'; - -const Key = 'PartiallySettleLegsOperation' as const; - -/** - * Partially settles legs of an RFQ - * - * ```ts - * const rfq = await convergence - * .rfqs() - * .partiallySettleLegs({ - * rfq: rfq.address, - * response: rfqResponse.address, - * maker, - * taker, - * legAmountToSettle: 4 - * }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const partiallySettleLegsOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type PartiallySettleLegsOperation = Operation< - typeof Key, - PartiallySettleLegsInput, - PartiallySettleLegsOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type PartiallySettleLegsInput = { - /** - * The protocol address. - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** The Rfq address. */ - rfq: PublicKey; - - /** The Response address. */ - response: PublicKey; - - /** The Maker's public key address. */ - maker: PublicKey; - - /** The Taker's public key address. */ - taker: PublicKey; - - /* - * Args - */ - - /** The number of legs to settle. */ - legAmountToSettle: number; -}; - -/** - * @group Operations - * @category Outputs - */ -export type PartiallySettleLegsOutput = { - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const partiallySettleLegsOperationHandler: OperationHandler = - { - handle: async ( - operation: PartiallySettleLegsOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const builder = await partiallySettleLegsBuilder( - convergence, - { - ...operation.input, - }, - scope - ); - scope.throwIfCanceled(); - - const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( - convergence, - scope.confirmOptions - ); - - const output = await builder.sendAndConfirm(convergence, confirmOptions); - scope.throwIfCanceled(); - - return output; - }, - }; - -export type PartiallySettleLegsBuilderParams = PartiallySettleLegsInput; - -/** - * Partially settles legs - * - * ```ts - * const transactionBuilder = await convergence - * .rfqs() - * .builders() - * .partiallySettleLegs(); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const partiallySettleLegsBuilder = async ( - convergence: Convergence, - params: PartiallySettleLegsBuilderParams, - options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const rfqProgram = convergence.programs().getRfq(programs); - - const { rfq, response, maker, taker, legAmountToSettle } = params; - - const anchorRemainingAccounts: AccountMeta[] = []; - - const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); - const responseModel = await convergence - .rfqs() - .findResponseByAddress({ address: response }); - - const startIndex = parseInt(responseModel.settledLegs.toString()); - - for (let i = startIndex; i < startIndex + legAmountToSettle; i++) { - const leg = rfqModel.legs[i]; - const { legs } = await convergence.rfqs().getSettlementResult({ - rfq: rfqModel, - response: responseModel, - }); - const { receiver } = legs[i]; - - const instrumentProgramAccount: AccountMeta = { - pubkey: rfqModel.legs[i].getProgramId(), - isSigner: false, - isWritable: false, - }; - - const instrumentEscrowPda = new InstrumentPdasClient( - convergence - ).instrumentEscrow({ - response, - index: i, - rfqModel, - }); - - const baseAssetMint = await legToBaseAssetMint(convergence, leg); - - const legAccounts: AccountMeta[] = [ - //`escrow` - { - pubkey: instrumentEscrowPda, - isSigner: false, - isWritable: true, - }, - // `receiver_tokens` - { - pubkey: convergence - .tokens() - .pdas() - .associatedTokenAccount({ - mint: baseAssetMint!.address, - owner: receiver === 'maker' ? maker : taker, - programs, - }), - isSigner: false, - isWritable: true, - }, - { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: false }, - ]; - - anchorRemainingAccounts.push(instrumentProgramAccount, ...legAccounts); - } - - return TransactionBuilder.make() - .setFeePayer(payer) - .add( - { - instruction: ComputeBudgetProgram.setComputeUnitLimit({ - units: 1400000, - }), - signers: [], - }, - { - instruction: createPartiallySettleLegsInstruction( - { - protocol: convergence.protocol().pdas().protocol(), - rfq, - response, - anchorRemainingAccounts, - }, - { - legAmountToSettle, - }, - rfqProgram.address - ), - signers: [], - key: 'partiallySettleLegs', - } - ); -}; diff --git a/packages/js/src/plugins/rfqModule/operations/partiallySettleLegsAndSettle.ts b/packages/js/src/plugins/rfqModule/operations/partiallySettleLegsAndSettle.ts deleted file mode 100644 index f46770c71..000000000 --- a/packages/js/src/plugins/rfqModule/operations/partiallySettleLegsAndSettle.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; - -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - makeConfirmOptionsFinalizedOnMainnet, -} from '../../../types'; -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { settleBuilder } from './settle'; -import { partiallySettleLegsBuilder } from './partiallySettleLegs'; - -const Key = 'PartiallySettleLegsAndSettleOperation' as const; - -/** - * Partially settles legs and settles the remaining legs - * - * ```ts - * const quoteAsset = instrumentClient.createQuote(new SpotInstrument(...)); - * - * await convergence - * .rfqs() - * .partiallySettleLegsAndSettle({ - * rfq: rfq.address, - * response: rfqResponse.address, - * side: Side.Bid, - * legAmountToPrepare: 3, - * quoteAsset - * }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const partiallySettleLegsAndSettleOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type PartiallySettleLegsAndSettleOperation = Operation< - typeof Key, - PartiallySettleLegsAndSettleInput, - PartiallySettleLegsAndSettleOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type PartiallySettleLegsAndSettleInput = { - /** - * The protocol address. - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** The Rfq address. */ - rfq: PublicKey; - - /** The Response address. */ - response: PublicKey; - - /** The Maker's public key address. */ - maker: PublicKey; - - /** The Taker's public key address. */ - taker: PublicKey; - - /* - * Args - */ - - /** The number of legs to settle. */ - legAmountToSettle: number; -}; - -/** - * @group Operations - * @category Outputs - */ -export type PartiallySettleLegsAndSettleOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ - -export const partiallySettleLegsAndSettleOperationHandler: OperationHandler = - { - handle: async ( - operation: PartiallySettleLegsAndSettleOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const { rfq } = operation.input; - - const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( - convergence, - scope.confirmOptions - ); - - let settleRfqBuilder = await settleBuilder( - convergence, - { - ...operation.input, - }, - scope - ); - scope.throwIfCanceled(); - - const rfqModel = await convergence - .rfqs() - .findRfqByAddress({ address: rfq }); - - let slicedIndex = rfqModel.legs.length; - - while (settleRfqBuilder.checkTransactionFits()) { - const index = Math.trunc(slicedIndex / 2); - // const startIndex = rfqModel.legs.length - index; - const startIndex = rfqModel.legs.length - index + 3; - - settleRfqBuilder = await settleBuilder( - convergence, - { - ...operation.input, - startIndex, - }, - scope - ); - - slicedIndex = index; - } - - if (slicedIndex < rfqModel.legs.length) { - let partiallySettleSlicedLegAmount = rfqModel.legs.length - slicedIndex; - - let partiallySettleBuilder = await partiallySettleLegsBuilder( - convergence, - { - ...operation.input, - legAmountToSettle: partiallySettleSlicedLegAmount, - }, - scope - ); - - while (partiallySettleBuilder.checkTransactionFits()) { - const halvedLegAmount = Math.trunc( - partiallySettleSlicedLegAmount / 2 - ); - - partiallySettleBuilder = await partiallySettleLegsBuilder( - convergence, - { - ...operation.input, - legAmountToSettle: halvedLegAmount, - }, - scope - ); - - partiallySettleSlicedLegAmount = halvedLegAmount; - } - - await partiallySettleBuilder.sendAndConfirm( - convergence, - confirmOptions - ); - scope.throwIfCanceled(); - - let x = partiallySettleSlicedLegAmount; - - if (partiallySettleSlicedLegAmount < rfqModel.legs.length) { - while (x + slicedIndex < rfqModel.legs.length) { - const nextPartiallySettleLegs = - rfqModel.legs.length - slicedIndex - x; - - const nextPartiallySettleBuilder = await partiallySettleLegsBuilder( - convergence, - { - ...operation.input, - legAmountToSettle: nextPartiallySettleLegs, - }, - scope - ); - - await nextPartiallySettleBuilder.sendAndConfirm( - convergence, - confirmOptions - ); - scope.throwIfCanceled(); - - x += nextPartiallySettleLegs; - } - } - } - - const output = await settleRfqBuilder.sendAndConfirm( - convergence, - confirmOptions - ); - scope.throwIfCanceled(); - - return { ...output }; - }, - }; diff --git a/packages/js/src/plugins/rfqModule/operations/partlyRevertSettlementPreparation.ts b/packages/js/src/plugins/rfqModule/operations/partlyRevertSettlementPreparation.ts index 20eeaa70b..e71a5ddc3 100644 --- a/packages/js/src/plugins/rfqModule/operations/partlyRevertSettlementPreparation.ts +++ b/packages/js/src/plugins/rfqModule/operations/partlyRevertSettlementPreparation.ts @@ -1,5 +1,5 @@ import { PublicKey, AccountMeta } from '@solana/web3.js'; -import { createPartlyRevertSettlementPreparationInstruction } from '@convergence-rfq/rfq'; +import { createPartlyRevertEscrowSettlementPreparationInstruction } from '@convergence-rfq/rfq'; import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; @@ -156,6 +156,13 @@ export const partlyRevertSettlementPreparationBuilder = async ( .rfqs() .findResponseByAddress({ address: response }); + if ( + responseModel.model !== 'escrowResponse' || + rfqModel.model !== 'escrowRfq' + ) { + throw new Error('Response is not settled as an escrow!'); + } + const sidePreparedLegs: number = side === 'taker' ? parseInt(responseModel.takerPreparedLegs.toString()) @@ -209,8 +216,9 @@ export const partlyRevertSettlementPreparationBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ - instruction: createPartlyRevertSettlementPreparationInstruction( + instruction: createPartlyRevertEscrowSettlementPreparationInstruction( { protocol: convergence.protocol().pdas().protocol(), rfq, diff --git a/packages/js/src/plugins/rfqModule/operations/prepareMoreLegsSettlement.ts b/packages/js/src/plugins/rfqModule/operations/prepareMoreLegsSettlement.ts index 11e96d55b..293b524bd 100644 --- a/packages/js/src/plugins/rfqModule/operations/prepareMoreLegsSettlement.ts +++ b/packages/js/src/plugins/rfqModule/operations/prepareMoreLegsSettlement.ts @@ -5,7 +5,7 @@ import { ComputeBudgetProgram, } from '@solana/web3.js'; import { - createPrepareMoreLegsSettlementInstruction, + createPrepareMoreEscrowLegsSettlementInstruction, AuthoritySide, } from '@convergence-rfq/rfq'; import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; @@ -176,6 +176,13 @@ export const prepareMoreLegsSettlementBuilder = async ( .rfqs() .findResponseByAddress({ address: response }); + if ( + responseModel.model !== 'escrowResponse' || + rfqModel.model !== 'escrowRfq' + ) { + throw new Error('Response is not settled as an escrow!'); + } + const side = caller.publicKey.toBase58() == responseModel.maker.toBase58() ? AuthoritySide.Maker @@ -249,30 +256,29 @@ export const prepareMoreLegsSettlementBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) - .add( - { - instruction: ComputeBudgetProgram.setComputeUnitLimit({ - units: 1400000, - }), - signers: [], - }, - { - instruction: createPrepareMoreLegsSettlementInstruction( - { - caller: caller.publicKey, - protocol: convergence.protocol().pdas().protocol(), - rfq, - response, - anchorRemainingAccounts, - }, - { - side, - legAmountToPrepare, - }, - rfqProgram.address - ), - signers: [caller], - key: 'prepareMoreLegsSettlement', - } - ); + .add({ + instruction: ComputeBudgetProgram.setComputeUnitLimit({ + units: 1400000, + }), + signers: [], + }) + .addTxPriorityFeeIx(convergence) + .add({ + instruction: createPrepareMoreEscrowLegsSettlementInstruction( + { + caller: caller.publicKey, + protocol: convergence.protocol().pdas().protocol(), + rfq, + response, + anchorRemainingAccounts, + }, + { + side, + legAmountToPrepare, + }, + rfqProgram.address + ), + signers: [caller], + key: 'prepareMoreLegsSettlement', + }); }; diff --git a/packages/js/src/plugins/rfqModule/operations/preparePrintTradeSettlement.ts b/packages/js/src/plugins/rfqModule/operations/preparePrintTradeSettlement.ts new file mode 100644 index 000000000..8f73412f5 --- /dev/null +++ b/packages/js/src/plugins/rfqModule/operations/preparePrintTradeSettlement.ts @@ -0,0 +1,193 @@ +import { createPreparePrintTradeSettlementInstruction } from '@convergence-rfq/rfq'; +import { PublicKey } from '@solana/web3.js'; + +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, + makeConfirmOptionsFinalizedOnMainnet, +} from '../../../types'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { getAuthoritySide } from '../helpers'; +import { toSolitaAuthoritySide } from '../models'; +import { prependWithProviderProgram } from '@/plugins/printTradeModule'; + +const Key = 'PreparePrintTradeSettlementOperation' as const; + +/** + * @group Operations + * @category Constructors + */ +export const preparePrintTradeSettlementOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type PreparePrintTradeSettlementOperation = Operation< + typeof Key, + PreparePrintTradeSettlementInput, + PreparePrintTradeSettlementOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type PreparePrintTradeSettlementInput = { + /** The address of the Rfq account. */ + rfq: PublicKey; + + /** The address of the Response account. */ + response: PublicKey; +}; + +/** + * @group Operations + * @category Outputs + */ +export type PreparePrintTradeSettlementOutput = { + /** The blockchain response from sending and confirming the transaction. */ + response: SendAndConfirmTransactionResponse; +}; + +/** + * @group Operations + * @category Handlers + */ +export const preparePrintTradeSettlementOperationHandler: OperationHandler = + { + handle: async ( + operation: PreparePrintTradeSettlementOperation, + convergence: Convergence, + scope: OperationScope + ): Promise => { + const builders = await preparePrintTradeSettlementBuilders( + convergence, + { + ...operation.input, + }, + scope + ); + + const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( + convergence, + scope.confirmOptions + ); + + const lastValidBlockHeight = await convergence.rpc().getLatestBlockhash(); + const txs = builders.map((x) => x.toTransaction(lastValidBlockHeight)); + + const signedTxs = await convergence.identity().signAllTransactions(txs); + + const outputs = []; + for (const signedTx of signedTxs) { + const output = await convergence + .rpc() + .serializeAndSendTransaction( + signedTx, + lastValidBlockHeight, + confirmOptions + ); + + outputs.push(output); + } + + scope.throwIfCanceled(); + + return { response: outputs[outputs.length - 1] }; + }, + }; + +/** + * @group Transaction Builders + * @category Inputs + */ +export type PreparePrintTradeSettlementBuilderParams = + PreparePrintTradeSettlementInput; + +/** + * Prepares for settlement + * + * ```ts + * const transactionBuilder = convergence + * .rfqs() + * .builders() + * .preparePrintTradeSettlement({ address }); + * ``` + * + * @group Transaction Builders + * @category Constructors + */ +export const preparePrintTradeSettlementBuilders = async ( + cvg: Convergence, + params: PreparePrintTradeSettlementBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { rfq, response } = params; + + const caller = cvg.identity(); + const rfqProgram = cvg.programs().getRfq(programs); + + const rfqModel = await cvg.rfqs().findRfqByAddress({ address: rfq }); + const responseModel = await cvg + .rfqs() + .findResponseByAddress({ address: response }); + + if ( + responseModel.model !== 'printTradeResponse' || + rfqModel.model !== 'printTradeRfq' + ) { + throw new Error('Response is not settled as a print trade!'); + } + + const side = getAuthoritySide(caller.publicKey, rfqModel, responseModel); + if (side === null) { + throw Error('Passed caller is neither a taker nor a maker'); + } + + const { printTrade } = rfqModel; + + const { accounts: printTradeAccounts, builders } = + await printTrade.getSettlementPreparations( + rfqModel, + responseModel, + side, + options + ); + const remainingAccounts = prependWithProviderProgram( + printTrade, + printTradeAccounts + ); + + const preparePrintTradeIx = { + instruction: createPreparePrintTradeSettlementInstruction( + { + caller: caller.publicKey, + protocol: cvg.protocol().pdas().protocol(), + rfq, + response, + anchorRemainingAccounts: remainingAccounts, + }, + { + side: toSolitaAuthoritySide(side), + }, + rfqProgram.address + ), + signers: [caller], + key: 'preparePrintTradeSettlement', + }; + + return TransactionBuilder.make() + .setFeePayer(payer) + .add(...builders, preparePrintTradeIx) + .divideToMultipleBuildersThatFit(); +}; diff --git a/packages/js/src/plugins/rfqModule/operations/prepareSettlement.ts b/packages/js/src/plugins/rfqModule/operations/prepareSettlement.ts index 784c2ee69..184a0fa22 100644 --- a/packages/js/src/plugins/rfqModule/operations/prepareSettlement.ts +++ b/packages/js/src/plugins/rfqModule/operations/prepareSettlement.ts @@ -1,5 +1,5 @@ import { - createPrepareSettlementInstruction, + createPrepareEscrowSettlementInstruction, AuthoritySide, } from '@convergence-rfq/rfq'; import { @@ -25,7 +25,7 @@ import { TransactionBuilder, TransactionBuilderOptions, } from '../../../utils/TransactionBuilder'; -import { Rfq } from '../../rfqModule'; +import { EscrowResponse, EscrowRfq, Rfq } from '../../rfqModule'; import { getOrCreateATAtxBuilder } from '../../../utils/ata'; import { Mint } from '../../tokenModule'; import { InstrumentPdasClient } from '../../instrumentModule'; @@ -147,6 +147,10 @@ export const prepareSettlementOperationHandler: OperationHandler { const baseAssetMints: Mint[] = []; - for (const leg of rfqModel.legs) { - baseAssetMints.push(await legToBaseAssetMint(convergence, leg)); + for (const leg of rfq.legs) { + baseAssetMints.push(await legToBaseAssetMint(cvg, leg)); } + const spotInstrumentProgram = cvg.programs().getSpotInstrument(); + const anchorRemainingAccounts: AccountMeta[] = []; const spotInstrumentProgramAccount: AccountMeta = { @@ -314,29 +375,28 @@ export const prepareSettlementBuilder = async ( isWritable: false, }; - const systemProgram = convergence.programs().getSystem(programs); + const systemProgram = cvg.programs().getSystem(); - const quoteEscrowPda = new InstrumentPdasClient(convergence).quoteEscrow({ - response, + const quoteEscrowPda = new InstrumentPdasClient(cvg).quoteEscrow({ + response: response.address, program: spotInstrumentProgram.address, }); const quoteAccounts: AccountMeta[] = [ { - pubkey: caller.publicKey, - isSigner: true, + pubkey: caller, + isSigner: false, isWritable: true, }, { - pubkey: convergence.tokens().pdas().associatedTokenAccount({ - mint: rfqModel.quoteMint, - owner: caller.publicKey, - programs, + pubkey: cvg.tokens().pdas().associatedTokenAccount({ + mint: rfq.quoteMint, + owner: caller, }), isSigner: false, isWritable: true, }, - { pubkey: rfqModel.quoteMint, isSigner: false, isWritable: false }, + { pubkey: rfq.quoteMint, isSigner: false, isWritable: false }, { pubkey: quoteEscrowPda, isSigner: false, @@ -352,24 +412,21 @@ export const prepareSettlementBuilder = async ( const ataTxBuilderArray: TransactionBuilder[] = []; for (let legIndex = 0; legIndex < legAmountToPrepare; legIndex++) { const instrumentProgramAccount: AccountMeta = { - pubkey: rfqModel.legs[legIndex].getProgramId(), + pubkey: rfq.legs[legIndex].getProgramId(), isSigner: false, isWritable: false, }; - const instrumentEscrowPda = new InstrumentPdasClient( - convergence - ).instrumentEscrow({ - response, + const instrumentEscrowPda = new InstrumentPdasClient(cvg).instrumentEscrow({ + response: response.address, index: legIndex, - rfqModel, + rfqModel: rfq, }); const { ataPubKey, txBuilder } = await getOrCreateATAtxBuilder( - convergence, + cvg, baseAssetMints[legIndex].address, - caller.publicKey, - programs + caller ); if (txBuilder) { @@ -379,8 +436,8 @@ export const prepareSettlementBuilder = async ( const legAccounts: AccountMeta[] = [ // `caller` { - pubkey: caller.publicKey, - isSigner: true, + pubkey: caller, + isSigner: false, isWritable: true, }, // `caller_token_account` @@ -408,47 +465,16 @@ export const prepareSettlementBuilder = async ( anchorRemainingAccounts.push(instrumentProgramAccount, ...legAccounts); } - const prepareSettlementTxBuilder = TransactionBuilder.make() - .setFeePayer(payer) - .add( - { - instruction: ComputeBudgetProgram.setComputeUnitLimit({ - units: 1400000, - }), - signers: [], - }, - { - instruction: createPrepareSettlementInstruction( - { - caller: caller.publicKey, - protocol: convergence.protocol().pdas().protocol(), - rfq, - response, - anchorRemainingAccounts, - }, - { - side, - legAmountToPrepare, - }, - rfqProgram.address - ), - signers: [caller], - key: 'prepareSettlement', - } - ); - return { - ataTxBuilderArray, - prepareSettlementTxBuilder, - }; + return { anchorRemainingAccounts, ataTxBuilderArray }; }; -const doesRfqLegContainsPsyoptionsAmerican = (rfq: Rfq) => { +const doesRfqLegContainsPsyoptionsAmerican = (rfq: EscrowRfq) => { return rfq.legs.some((leg) => leg.getProgramId().equals(psyoptionsAmericanInstrumentProgram.address) ); }; -const doesRfqLegContainsPsyoptionsEuropean = (rfq: Rfq) => { +const doesRfqLegContainsPsyoptionsEuropean = (rfq: EscrowRfq) => { return rfq.legs.some((leg) => leg.getProgramId().equals(psyoptionsEuropeanInstrumentProgram.address) ); diff --git a/packages/js/src/plugins/rfqModule/operations/respondToRfq.ts b/packages/js/src/plugins/rfqModule/operations/respondToRfq.ts index f75257b41..3dd4d8b30 100644 --- a/packages/js/src/plugins/rfqModule/operations/respondToRfq.ts +++ b/packages/js/src/plugins/rfqModule/operations/respondToRfq.ts @@ -1,5 +1,5 @@ import { createRespondToRfqInstruction } from '@convergence-rfq/rfq'; -import { PublicKey, AccountMeta, ComputeBudgetProgram } from '@solana/web3.js'; +import { PublicKey, ComputeBudgetProgram, AccountMeta } from '@solana/web3.js'; import BN from 'bn.js'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; @@ -10,7 +10,6 @@ import { OperationHandler, OperationScope, useOperation, - Signer, } from '../../../types'; import { TransactionBuilder, @@ -20,6 +19,10 @@ import { Quote, Rfq } from '../models'; import { toSolitaQuote } from '../models/Quote'; import { rfqProgram } from '../program'; import { convertTimestampToSeconds } from '@/utils'; +import { + AdditionalResponseData, + prependWithProviderProgram, +} from '@/plugins/printTradeModule'; const getNextResponsePdaAndDistinguisher = async ( cvg: Convergence, @@ -113,39 +116,9 @@ export type RespondToRfqInput = { rfq: PublicKey; /** - * The maker of the Response as a Signer. - * - * @defaultValue `convergence.identity()` - */ - maker?: Signer; - - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** - * Optional address of the taker collateral info account. - * - * @defaultValue `convergence.collateral().pdas().collateralInfo({ user: response.maker })` + * Is sometimes required to pass for print trades */ - collateralInfo?: PublicKey; - - /** - * Optional address of the maker collateral tokens account. - * - * @defaultValue `convergence.collateral().pdas().collateralTokens({ user: maker.publicKey })` - */ - collateralToken?: PublicKey; - - /** - * Optional address of the risk engine account. - * - * @defaultValue `convergence.programs().getRiskEngine(programs)` - */ - riskEngine?: PublicKey; + additionalData?: AdditionalResponseData; }; /** @@ -236,19 +209,20 @@ export const respondToRfqBuilder = async ( rfq, bid = null, ask = null, - maker = convergence.identity(), - protocol = convergence.protocol().pdas().protocol(), - riskEngine = convergence.programs().getRiskEngine(programs).address, - collateralInfo = convergence.collateral().pdas().collateralInfo({ - user: maker.publicKey, - programs, - }), - collateralToken = convergence.collateral().pdas().collateralToken({ - user: maker.publicKey, - programs, - }), expirationTimestamp, + additionalData, } = params; + const maker = convergence.identity(); + const protocol = convergence.protocol().pdas().protocol(); + const riskEngine = convergence.programs().getRiskEngine(programs).address; + const collateralInfo = convergence.collateral().pdas().collateralInfo({ + user: maker.publicKey, + programs, + }); + const collateralToken = convergence.collateral().pdas().collateralToken({ + user: maker.publicKey, + programs, + }); if (!bid && !ask) { throw new Error('Must provide either a bid and/or ask'); @@ -256,6 +230,19 @@ export const respondToRfqBuilder = async ( const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); + let validateResponseAccounts: AccountMeta[] = []; + if (rfqModel.model === 'escrowRfq' && additionalData !== undefined) { + throw new Error( + 'Escrow rfqs does not allow passing additional response data' + ); + } + if (rfqModel.model === 'printTradeRfq') { + validateResponseAccounts = prependWithProviderProgram( + rfqModel.printTrade, + await rfqModel.printTrade.getValidateResponseAccounts(additionalData) + ); + } + const rfqExpirationTimestampSeconds = convertTimestampToSeconds(rfqModel.creationTimestamp) + rfqModel.activeWindow; @@ -287,36 +274,6 @@ export const respondToRfqBuilder = async ( rfqModel ); - // TODO: DRY - const baseAssetIndexValuesSet: Set = new Set(); - for (const leg of rfqModel.legs) { - baseAssetIndexValuesSet.add(leg.getBaseAssetIndex().value); - } - const baseAssetAccounts: AccountMeta[] = []; - const baseAssetIndexValues = Array.from(baseAssetIndexValuesSet); - const oracleAccounts: AccountMeta[] = []; - for (const index of baseAssetIndexValues) { - const baseAsset = convergence.protocol().pdas().baseAsset({ index }); - const baseAssetAccount: AccountMeta = { - pubkey: baseAsset, - isSigner: false, - isWritable: false, - }; - - baseAssetAccounts.push(baseAssetAccount); - - const baseAssetModel = await convergence - .protocol() - .findBaseAssetByAddress({ address: baseAsset }); - if (baseAssetModel.priceOracle.address) { - oracleAccounts.push({ - pubkey: baseAssetModel.priceOracle.address, - isSigner: false, - isWritable: false, - }); - } - } - const defaultPubkey = PublicKey.default; const whitelist = rfqModel.whitelist.toBase58() !== defaultPubkey.toBase58() @@ -341,43 +298,35 @@ export const respondToRfqBuilder = async ( .setContext({ response, }) - .add( - { - instruction: ComputeBudgetProgram.setComputeUnitLimit({ - units: 1_400_000, - }), - signers: [], - }, - { - instruction: createRespondToRfqInstruction( - { - rfq, - response, - collateralInfo, - collateralToken, - protocol, - riskEngine, - whitelist, - maker: maker.publicKey, - anchorRemainingAccounts: [ - { - pubkey: convergence.riskEngine().pdas().config(), - isSigner: false, - isWritable: false, - }, - ...baseAssetAccounts, - ...oracleAccounts, - ], - }, - { - bid: bid && toSolitaQuote(bid, rfqModel.quoteAsset.getDecimals()), - ask: ask && toSolitaQuote(ask, rfqModel.quoteAsset.getDecimals()), - pdaDistinguisher, - expirationTimestamp: expirationTimestampBn, - } - ), - signers: [maker], - key: 'respondToRfq', - } - ); + .add({ + instruction: ComputeBudgetProgram.setComputeUnitLimit({ + units: 1_400_000, + }), + signers: [], + }) + .addTxPriorityFeeIx(convergence) + .add({ + instruction: createRespondToRfqInstruction( + { + rfq, + response, + collateralInfo, + collateralToken, + protocol, + riskEngine, + whitelist, + maker: maker.publicKey, + anchorRemainingAccounts: validateResponseAccounts, + }, + { + bid: bid && toSolitaQuote(bid, rfqModel.quoteAsset.getDecimals()), + ask: ask && toSolitaQuote(ask, rfqModel.quoteAsset.getDecimals()), + pdaDistinguisher, + expirationTimestamp: expirationTimestampBn, + additionalData: additionalData?.serialize() ?? Buffer.from([]), + } + ), + signers: [maker], + key: 'respondToRfq', + }); }; diff --git a/packages/js/src/plugins/rfqModule/operations/revertSettlementPreparation.ts b/packages/js/src/plugins/rfqModule/operations/revertSettlementPreparation.ts index 68e6e51d3..1982a2769 100644 --- a/packages/js/src/plugins/rfqModule/operations/revertSettlementPreparation.ts +++ b/packages/js/src/plugins/rfqModule/operations/revertSettlementPreparation.ts @@ -1,5 +1,8 @@ import { PublicKey, AccountMeta } from '@solana/web3.js'; -import { createRevertSettlementPreparationInstruction } from '@convergence-rfq/rfq'; +import { + createRevertEscrowSettlementPreparationInstruction, + createRevertPrintTradeSettlementPreparationPreparationInstruction, +} from '@convergence-rfq/rfq'; import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; import { SendAndConfirmTransactionResponse } from '../../rpcModule'; @@ -17,7 +20,14 @@ import { } from '../../../utils/TransactionBuilder'; import { InstrumentPdasClient } from '../../instrumentModule'; import { AuthoritySide, toSolitaAuthoritySide } from '../models/AuthoritySide'; +import { + EscrowResponse, + EscrowRfq, + PrintTradeResponse, + PrintTradeRfq, +} from '../models'; import { legToBaseAssetMint } from '@/plugins/instrumentModule'; +import { prependWithProviderProgram } from '@/plugins/printTradeModule'; const Key = 'RevertSettlementPreparationOperation' as const; @@ -51,23 +61,9 @@ export type RevertSettlementPreparationOperation = Operation< * @category Inputs */ export type RevertSettlementPreparationInput = { - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** The Rfq address. */ - rfq: PublicKey; - /** The Response address. */ response: PublicKey; - /* - * Args - */ - /** * The side (Maker or Taker) that is reverting * settlement preparation. @@ -137,19 +133,75 @@ export const revertSettlementPreparationBuilder = async ( params: RevertSettlementPreparationBuilderParams, options: TransactionBuilderOptions = {} ): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const rfqProgram = convergence.programs().getRfq(programs); + const responseModel = await convergence + .rfqs() + .findResponseByAddress({ address: params.response }); + const rfqModel = await convergence + .rfqs() + .findRfqByAddress({ address: responseModel.rfq }); + + if ( + responseModel.model === 'escrowResponse' && + rfqModel.model === 'escrowRfq' + ) { + return revertEscrowSettlementPreparationBuilder( + convergence, + { + response: responseModel, + rfq: rfqModel, + side: params.side, + }, + options + ); + } else if ( + responseModel.model === 'printTradeResponse' && + rfqModel.model === 'printTradeRfq' + ) { + return revertPrintTradeSettlementPreparationBuilder( + convergence, + { + response: responseModel, + rfq: rfqModel, + side: params.side, + }, + options + ); + } - const { rfq, response, side } = params; + throw new Error('Rfq type does not match with response type!'); +}; - const anchorRemainingAccounts: AccountMeta[] = []; +export type RevertEscrowSettlementPreparationBuilderParams = { + response: PublicKey | EscrowResponse; + rfq?: EscrowRfq; + side: AuthoritySide; +}; - const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); - const responseModel = await convergence - .rfqs() - .findResponseByAddress({ address: response }); +export const revertEscrowSettlementPreparationBuilder = async ( + cvg: Convergence, + params: RevertEscrowSettlementPreparationBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { response, rfq, side } = params; + + const responseModel = + response instanceof PublicKey + ? await cvg.rfqs().findResponseByAddress({ address: response }) + : response; + const rfqModel = + rfq ?? (await cvg.rfqs().findRfqByAddress({ address: responseModel.rfq })); + + if ( + responseModel.model !== 'escrowResponse' || + rfqModel.model !== 'escrowRfq' + ) { + throw new Error('Response is not settled as an escrow!'); + } - const spotInstrumentProgram = convergence.programs().getSpotInstrument(); + const rfqProgram = cvg.programs().getRfq(programs); + const anchorRemainingAccounts: AccountMeta[] = []; + const spotInstrumentProgram = cvg.programs().getSpotInstrument(); const sidePreparedLegs: number = side === 'taker' @@ -157,10 +209,8 @@ export const revertSettlementPreparationBuilder = async ( : parseInt(responseModel.makerPreparedLegs.toString()); for (let i = 0; i < sidePreparedLegs; i++) { - const instrumentEscrowPda = new InstrumentPdasClient( - convergence - ).instrumentEscrow({ - response, + const instrumentEscrowPda = new InstrumentPdasClient(cvg).instrumentEscrow({ + response: responseModel.address, index: i, rfqModel, }); @@ -173,7 +223,7 @@ export const revertSettlementPreparationBuilder = async ( const leg = rfqModel.legs[i]; - const baseAssetMint = await legToBaseAssetMint(convergence, leg); + const baseAssetMint = await legToBaseAssetMint(cvg, leg); const legAccounts: AccountMeta[] = [ //`escrow` @@ -184,7 +234,7 @@ export const revertSettlementPreparationBuilder = async ( }, // `receiver_tokens` { - pubkey: convergence + pubkey: cvg .tokens() .pdas() .associatedTokenAccount({ @@ -207,8 +257,8 @@ export const revertSettlementPreparationBuilder = async ( isWritable: false, }; - const quoteEscrowPda = new InstrumentPdasClient(convergence).quoteEscrow({ - response, + const quoteEscrowPda = new InstrumentPdasClient(cvg).quoteEscrow({ + response: responseModel.address, program: spotInstrumentProgram.address, }); @@ -221,7 +271,7 @@ export const revertSettlementPreparationBuilder = async ( }, // `receiver_tokens` { - pubkey: convergence + pubkey: cvg .tokens() .pdas() .associatedTokenAccount({ @@ -239,12 +289,13 @@ export const revertSettlementPreparationBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(cvg) .add({ - instruction: createRevertSettlementPreparationInstruction( + instruction: createRevertEscrowSettlementPreparationInstruction( { - protocol: convergence.protocol().pdas().protocol(), - rfq, - response, + protocol: cvg.protocol().pdas().protocol(), + rfq: rfqModel.address, + response: responseModel.address, anchorRemainingAccounts, }, { @@ -256,3 +307,70 @@ export const revertSettlementPreparationBuilder = async ( key: 'revertSettlementPreparation', }); }; + +export type RevertPrintTradeSettlementPreparationBuilderParams = { + response: PublicKey | PrintTradeResponse; + rfq?: PrintTradeRfq; + side: AuthoritySide; +}; + +export const revertPrintTradeSettlementPreparationBuilder = async ( + cvg: Convergence, + params: RevertPrintTradeSettlementPreparationBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { response, rfq, side } = params; + + const responseModel = + response instanceof PublicKey + ? await cvg.rfqs().findResponseByAddress({ address: response }) + : response; + const rfqModel = + rfq ?? (await cvg.rfqs().findRfqByAddress({ address: responseModel.rfq })); + + if ( + responseModel.model !== 'printTradeResponse' || + rfqModel.model !== 'printTradeRfq' + ) { + throw new Error('Response is not settled as a print trade!'); + } + + const { accounts: remainingAccounts, postBuilders } = + await rfqModel.printTrade.getRevertPreparations( + rfqModel, + responseModel, + side, + options + ); + + const fullRemainingAccounts = prependWithProviderProgram( + rfqModel.printTrade, + remainingAccounts + ); + + const rfqProgram = cvg.programs().getRfq(programs); + + return TransactionBuilder.make() + .setFeePayer(payer) + .add( + { + instruction: + createRevertPrintTradeSettlementPreparationPreparationInstruction( + { + protocol: cvg.protocol().pdas().protocol(), + rfq: rfqModel.address, + response: responseModel.address, + anchorRemainingAccounts: fullRemainingAccounts, + }, + { + side: toSolitaAuthoritySide(side), + }, + rfqProgram.address + ), + signers: [], + key: 'revertSettlementPreparation', + }, + ...postBuilders + ); +}; diff --git a/packages/js/src/plugins/rfqModule/operations/settle.ts b/packages/js/src/plugins/rfqModule/operations/settle.ts index 831947092..295a724b2 100644 --- a/packages/js/src/plugins/rfqModule/operations/settle.ts +++ b/packages/js/src/plugins/rfqModule/operations/settle.ts @@ -1,4 +1,7 @@ -import { createSettleInstruction } from '@convergence-rfq/rfq'; +import { + createSettleEscrowInstruction, + createSettlePrintTradeInstruction, +} from '@convergence-rfq/rfq'; import { PublicKey, AccountMeta, ComputeBudgetProgram } from '@solana/web3.js'; import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; @@ -10,13 +13,25 @@ import { OperationScope, useOperation, makeConfirmOptionsFinalizedOnMainnet, + Program, } from '../../../types'; import { TransactionBuilder, TransactionBuilderOptions, } from '../../../utils/TransactionBuilder'; import { InstrumentPdasClient } from '../../instrumentModule'; +import { + EscrowResponse, + EscrowRfq, + PrintTradeResponse, + PrintTradeRfq, +} from '../models'; +import { Receiver } from './getSettlementResult'; import { legToBaseAssetMint } from '@/plugins/instrumentModule'; +import { prependWithProviderProgram } from '@/plugins/printTradeModule'; +import { spotInstrumentProgram } from '@/plugins/spotInstrumentModule'; +import { InstructionUniquenessTracker, getOrCreateATAtxBuilder } from '@/utils'; +import { Protocol } from '@/plugins/protocolModule'; const Key = 'SettleOperation' as const; @@ -45,32 +60,8 @@ export type SettleOperation = Operation; * @category Inputs */ export type SettleInput = { - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** The address of the RFQ account. */ - rfq: PublicKey; - /** The address of the response account. */ response: PublicKey; - - /** The maker public key address. */ - maker: PublicKey; - - /** The taker public key address. */ - taker: PublicKey; - - /** - * Optional start index to corresponding to the first leg to settle. Used internally by - * Convergence SDK and does not need to be passed manually. - * - * @defaultValue `0` - * */ - startIndex?: number; }; /** @@ -92,7 +83,7 @@ export const settleOperationHandler: OperationHandler = { convergence: Convergence, scope: OperationScope ): Promise => { - const builder = await settleBuilder( + const { ataTxBuilderArray, settleTxBuilder } = await settleBuilder( convergence, { ...operation.input, @@ -106,10 +97,30 @@ export const settleOperationHandler: OperationHandler = { scope.confirmOptions ); - const output = await builder.sendAndConfirm(convergence, confirmOptions); + const lastValidBlockHeight = await convergence.rpc().getLatestBlockhash(); + const dedupAtaBuiders = + InstructionUniquenessTracker.dedup(ataTxBuilderArray); + const txs = [...dedupAtaBuiders, settleTxBuilder].map((txBuilder) => + txBuilder.toTransaction(lastValidBlockHeight) + ); + const signedTxs = await convergence.identity().signAllTransactions(txs); + + const outputs = []; + for (const signedTx of signedTxs) { + const output = await convergence + .rpc() + .serializeAndSendTransaction( + signedTx, + lastValidBlockHeight, + confirmOptions + ); + + outputs.push(output); + } + scope.throwIfCanceled(); - return { ...output }; + return { response: outputs[outputs.length - 1] }; }, }; @@ -119,16 +130,12 @@ export const settleOperationHandler: OperationHandler = { */ export type SettleBuilderParams = SettleInput; +export type SettleBuilderResult = { + ataTxBuilderArray: TransactionBuilder[]; + settleTxBuilder: TransactionBuilder; +}; + /** - * Settles - * - * ```ts - * const transactionBuilder = convergence - * .rfqs() - * .builders() - * .settle({ address }); - * ``` - * * @group Transaction Builders * @category Constructors */ @@ -136,100 +143,281 @@ export const settleBuilder = async ( convergence: Convergence, params: SettleBuilderParams, options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { rfq, response, maker, taker } = params; - - const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); +): Promise => { const responseModel = await convergence .rfqs() - .findResponseByAddress({ address: response }); + .findResponseByAddress({ address: params.response }); + const rfqModel = await convergence + .rfqs() + .findRfqByAddress({ address: responseModel.rfq }); - const { startIndex = parseInt(responseModel.settledLegs.toString()) } = - params; + if ( + responseModel.model === 'escrowResponse' && + rfqModel.model === 'escrowRfq' + ) { + return settleEscrowBuilder( + convergence, + { + response: responseModel, + rfq: rfqModel, + }, + options + ); + } else if ( + responseModel.model === 'printTradeResponse' && + rfqModel.model === 'printTradeRfq' + ) { + return settlePrintTradeBuilder( + convergence, + { + response: responseModel, + rfq: rfqModel, + }, + options + ); + } - const rfqProgram = convergence.programs().getRfq(programs); + throw new Error('Rfq type does not match with response type!'); +}; + +export type SettleEscrowBuilderParams = { + response: PublicKey | EscrowResponse; + rfq?: EscrowRfq; + startIndex?: number; +}; + +export const settleEscrowBuilder = async ( + cvg: Convergence, + params: SettleEscrowBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { response, rfq, startIndex = 0 } = params; + + const responseModel = + response instanceof PublicKey + ? await cvg.rfqs().findResponseByAddress({ address: response }) + : response; + const rfqModel = + rfq ?? (await cvg.rfqs().findRfqByAddress({ address: responseModel.rfq })); + + if ( + responseModel.model !== 'escrowResponse' || + rfqModel.model !== 'escrowRfq' + ) { + throw new Error('Response is not settled as an escrow!'); + } + + const rfqProgram = cvg.programs().getRfq(programs); + const protocol = await cvg.protocol().get(); + const ataTxBuilderArray: TransactionBuilder[] = []; const anchorRemainingAccounts: AccountMeta[] = []; - const spotInstrumentProgram = convergence.programs().getSpotInstrument(); - const { legs, quote } = await convergence.rfqs().getSettlementResult({ + const { legs, quote } = await cvg.rfqs().getSettlementResult({ response: responseModel, rfq: rfqModel, }); + const accountsToAddContext = { + cvg, + protocol, + rfq: rfqModel, + response: responseModel, + programs, + }; + for (let legIndex = startIndex; legIndex < rfqModel.legs.length; legIndex++) { const leg = rfqModel.legs[legIndex]; const { receiver } = legs[legIndex]; - const baseAssetMint = await legToBaseAssetMint(convergence, leg); + const baseAssetMint = await legToBaseAssetMint(cvg, leg); - const instrumentProgramAccount: AccountMeta = { - pubkey: rfqModel.legs[legIndex].getProgramId(), - isSigner: false, - isWritable: false, - }; - - const instrumentEscrowPda = new InstrumentPdasClient( - convergence - ).instrumentEscrow({ - response, - index: legIndex, - rfqModel, - }); + if (leg.getProgramId().equals(spotInstrumentProgram.address)) { + const { ataTxBuilder, accounts } = await getSettleAccountsSpot( + baseAssetMint.address, + receiver, + { + leg: legIndex, + }, + accountsToAddContext + ); - const legAccounts: AccountMeta[] = [ - //`escrow` - { - pubkey: instrumentEscrowPda, - isSigner: false, - isWritable: true, - }, - // `receiver_tokens` - { - pubkey: convergence - .tokens() - .pdas() - .associatedTokenAccount({ - mint: baseAssetMint!.address, - owner: receiver === 'maker' ? maker : taker, - programs, - }), - isSigner: false, - isWritable: true, - }, - { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: false }, - ]; + if (ataTxBuilder !== undefined) { + ataTxBuilderArray.push(ataTxBuilder); + } + + anchorRemainingAccounts.push(...accounts); + } else { + const accounts = getSettleAccountsNonSpot( + leg.getProgramId(), + baseAssetMint.address, + receiver, + { leg: legIndex }, + accountsToAddContext + ); + + anchorRemainingAccounts.push(...accounts); + } + } - anchorRemainingAccounts.push(instrumentProgramAccount, ...legAccounts); + const { accounts, ataTxBuilder } = await getSettleAccountsSpot( + rfqModel.quoteMint, + quote.receiver, + 'quote', + accountsToAddContext + ); + if (ataTxBuilder !== undefined) { + ataTxBuilderArray.push(ataTxBuilder); } + anchorRemainingAccounts.push(...accounts); + + const settleTxBuilder = TransactionBuilder.make() + .setFeePayer(payer) + .add({ + instruction: ComputeBudgetProgram.setComputeUnitLimit({ + units: 1_400_000, + }), + signers: [], + }) + .addTxPriorityFeeIx(cvg) + .add({ + instruction: createSettleEscrowInstruction( + { + protocol: cvg.protocol().pdas().protocol(), + rfq: rfqModel.address, + response: responseModel.address, + anchorRemainingAccounts, + }, + rfqProgram.address + ), + signers: [], + key: 'settle', + }); - const spotInstrumentProgramAccount: AccountMeta = { - pubkey: spotInstrumentProgram.address, - isSigner: false, - isWritable: false, + return { + ataTxBuilderArray, + settleTxBuilder, }; +}; - const quoteEscrowPda = new InstrumentPdasClient(convergence).quoteEscrow({ - response, - program: spotInstrumentProgram.address, - }); +export const getSettleAccountsSpot = async ( + mint: PublicKey, + receiver: Receiver, + asset: { leg: number } | 'quote', + context: { + cvg: Convergence; + protocol: Protocol; + rfq: EscrowRfq; + response: EscrowResponse; + programs: Program[] | undefined; + } +): Promise<{ + ataTxBuilder?: TransactionBuilder; + accounts: AccountMeta[]; +}> => { + const { cvg, rfq, response, protocol, programs } = context; + const programId = spotInstrumentProgram.address; + const pdaClient = new InstrumentPdasClient(cvg); + const escrow = + asset === 'quote' + ? pdaClient.quoteEscrow({ + response: response.address, + program: programId, + }) + : pdaClient.instrumentEscrow({ + response: response.address, + index: asset.leg, + rfqModel: rfq, + }); + + const { ataPubKey: authorityAtaKey, txBuilder: ataTxBuilder } = + await getOrCreateATAtxBuilder(cvg, mint, protocol.authority, programs); + + const accounts = [ + { + pubkey: programId, + isSigner: false, + isWritable: false, + }, + { + pubkey: cvg.spotInstrument().pdas().config(), + isSigner: false, + isWritable: false, + }, + { + pubkey: escrow, + isSigner: false, + isWritable: true, + }, + { + pubkey: cvg + .tokens() + .pdas() + .associatedTokenAccount({ + mint, + owner: receiver === 'maker' ? response.maker : rfq.taker, + programs, + }), + isSigner: false, + isWritable: true, + }, + { + pubkey: authorityAtaKey, + isSigner: false, + isWritable: true, + }, + { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: false }, + ]; - const quoteAccounts: AccountMeta[] = [ - //`escrow` + return { ataTxBuilder, accounts }; +}; + +export const getSettleAccountsNonSpot = ( + programId: PublicKey, + mint: PublicKey, + receiver: Receiver, + asset: { leg: number } | 'quote', + context: { + cvg: Convergence; + protocol: Protocol; + rfq: EscrowRfq; + response: EscrowResponse; + programs: Program[] | undefined; + } +) => { + const { cvg, rfq, response, programs } = context; + const pdaClient = new InstrumentPdasClient(cvg); + const escrow = + asset === 'quote' + ? pdaClient.quoteEscrow({ + response: response.address, + program: programId, + }) + : pdaClient.instrumentEscrow({ + response: response.address, + index: asset.leg, + rfqModel: rfq, + }); + + return [ + { + pubkey: programId, + isSigner: false, + isWritable: false, + }, { - pubkey: quoteEscrowPda, + pubkey: escrow, isSigner: false, isWritable: true, }, - // `receiver_tokens` { - pubkey: convergence + pubkey: cvg .tokens() .pdas() .associatedTokenAccount({ - mint: rfqModel.quoteMint, - owner: quote.receiver === 'maker' ? maker : taker, + mint, + owner: receiver === 'maker' ? response.maker : rfq.taker, programs, }), isSigner: false, @@ -237,10 +425,44 @@ export const settleBuilder = async ( }, { pubkey: TOKEN_PROGRAM_ID, isSigner: false, isWritable: false }, ]; +}; - anchorRemainingAccounts.push(spotInstrumentProgramAccount, ...quoteAccounts); +export type SettlePrintTradeBuilderParams = { + response: PublicKey | PrintTradeResponse; + rfq?: PrintTradeRfq; +}; - return TransactionBuilder.make() +export const settlePrintTradeBuilder = async ( + convergence: Convergence, + params: SettlePrintTradeBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; + const { response, rfq } = params; + + const responseModel = + response instanceof PublicKey + ? await convergence.rfqs().findResponseByAddress({ address: response }) + : response; + const rfqModel = + rfq ?? + (await convergence.rfqs().findRfqByAddress({ address: responseModel.rfq })); + + if ( + responseModel.model !== 'printTradeResponse' || + rfqModel.model !== 'printTradeRfq' + ) { + throw new Error('Response is not settled as a print trade!'); + } + + const rfqProgram = convergence.programs().getRfq(programs); + + const remainingAccounts = prependWithProviderProgram( + rfqModel.printTrade, + await rfqModel.printTrade.getSettlementAccounts(rfqModel, responseModel) + ); + + const settleTxBuilder = TransactionBuilder.make() .setFeePayer(payer) .add( { @@ -250,12 +472,12 @@ export const settleBuilder = async ( signers: [], }, { - instruction: createSettleInstruction( + instruction: createSettlePrintTradeInstruction( { protocol: convergence.protocol().pdas().protocol(), - rfq, - response, - anchorRemainingAccounts, + rfq: rfqModel.address, + response: responseModel.address, + anchorRemainingAccounts: remainingAccounts, }, rfqProgram.address ), @@ -263,4 +485,9 @@ export const settleBuilder = async ( key: 'settle', } ); + + return { + ataTxBuilderArray: [], + settleTxBuilder, + }; }; diff --git a/packages/js/src/plugins/rfqModule/operations/settleOnePartyDefault.ts b/packages/js/src/plugins/rfqModule/operations/settleOnePartyDefault.ts deleted file mode 100644 index d0a0e0ff2..000000000 --- a/packages/js/src/plugins/rfqModule/operations/settleOnePartyDefault.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { createSettleOnePartyDefaultInstruction } from '@convergence-rfq/rfq'; -import { PublicKey } from '@solana/web3.js'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - makeConfirmOptionsFinalizedOnMainnet, -} from '../../../types'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { protocolCache } from '../../protocolModule/cache'; - -const Key = 'SettleOnePartyDefaultOperation' as const; - -/** - * Settles one party default. - * - * ```ts - * await convergence - * .rfqs() - * .settleOnePartyDefault({ - * rfq: rfq.address, - * response: rfqResponse.address - * }; - * ``` - * - * @group Operations - * @category Constructors - */ -export const settleOnePartyDefaultOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type SettleOnePartyDefaultOperation = Operation< - typeof Key, - SettleOnePartyDefaultInput, - SettleOnePartyDefaultOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type SettleOnePartyDefaultInput = { - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol(),` - */ - protocol?: PublicKey; - - /** The address of the Rfq account. */ - rfq: PublicKey; - - /** The address of the Response account. */ - response: PublicKey; - - /** - * Optional address of the Taker's collateral info account. - * - * @defaultValue `convergence.collateral().pdas().collateralInfo({ user: rfq.taker })` - * - */ - takerCollateralInfo?: PublicKey; - - /** - * Optional address of the Maker's collateral info account. - * - * @defaultValue `convergence.collateral().pdas().collateralInfo({ user: response.maker })` - * - */ - makerCollateralInfo?: PublicKey; - - /** Optional address of the Taker's collateral tokens account. - * - * @defaultValue `convergence.collateral().pdas(). - * collateralTokens({ - * user: rfq.taker, - * })` - */ - takerCollateralTokens?: PublicKey; - - /** Optional address of the Maker's collateral tokens account. - * - * @defaultValue `convergence.collateral().pdas(). - * collateralTokens({ - * user: response.maker, - * })` - */ - makerCollateralTokens?: PublicKey; - - /** Optional address of the DAO's collateral tokens account. - * - * @defaultValue `convergence.collateral().pdas(). - * collateralTokens({ - * user: dao - * })` - */ - protocolCollateralTokens?: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type SettleOnePartyDefaultOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const settleOnePartyDefaultOperationHandler: OperationHandler = - { - handle: async ( - operation: SettleOnePartyDefaultOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const builder = await settleOnePartyDefaultBuilder( - convergence, - { - ...operation.input, - }, - scope - ); - scope.throwIfCanceled(); - - const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( - convergence, - scope.confirmOptions - ); - - const output = await builder.sendAndConfirm(convergence, confirmOptions); - scope.throwIfCanceled(); - - return { ...output }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type SettleOnePartyDefaultBuilderParams = SettleOnePartyDefaultInput; - -/** - * Settles one party default - * - * ```ts - * const transactionBuilder = convergence - * .rfqs() - * .builders() - * .settleOnePartyDefault({ address }); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const settleOnePartyDefaultBuilder = async ( - convergence: Convergence, - params: SettleOnePartyDefaultBuilderParams, - options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { rfq, response } = params; - - const protocol = await protocolCache.get(convergence); - - const rfqProgram = convergence.programs().getRfq(programs); - const tokenProgram = convergence.programs().getToken(programs); - - const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); - const responseModel = await convergence - .rfqs() - .findResponseByAddress({ address: response }); - - let { - takerCollateralInfo, - makerCollateralInfo, - takerCollateralTokens, - makerCollateralTokens, - protocolCollateralTokens, - } = params; - - const takerCollateralInfoPda = convergence - .collateral() - .pdas() - .collateralInfo({ - user: rfqModel.taker, - programs, - }); - const makerCollateralInfoPda = convergence - .collateral() - .pdas() - .collateralInfo({ - user: responseModel.maker, - programs, - }); - const takerCollateralTokensPda = convergence - .collateral() - .pdas() - .collateralToken({ - user: rfqModel.taker, - programs, - }); - const makerCollateralTokensPda = convergence - .collateral() - .pdas() - .collateralToken({ - user: responseModel.maker, - programs, - }); - const protocolCollateralTokensPda = convergence - .collateral() - .pdas() - .collateralToken({ - user: protocol.authority, - programs, - }); - - takerCollateralInfo = takerCollateralInfo ?? takerCollateralInfoPda; - makerCollateralInfo = makerCollateralInfo ?? makerCollateralInfoPda; - takerCollateralTokens = takerCollateralTokens ?? takerCollateralTokensPda; - makerCollateralTokens = makerCollateralTokens ?? makerCollateralTokensPda; - protocolCollateralTokens = - protocolCollateralTokens ?? protocolCollateralTokensPda; - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createSettleOnePartyDefaultInstruction( - { - protocol: protocol.address, - rfq, - response, - takerCollateralInfo, - makerCollateralInfo, - takerCollateralTokens, - makerCollateralTokens, - protocolCollateralTokens, - tokenProgram: tokenProgram.address, - }, - rfqProgram.address - ), - signers: [], - key: 'settleOnePartyDefault', - }); -}; diff --git a/packages/js/src/plugins/rfqModule/operations/settleTwoPartyDefault.ts b/packages/js/src/plugins/rfqModule/operations/settleTwoPartyDefault.ts deleted file mode 100644 index 707ee8898..000000000 --- a/packages/js/src/plugins/rfqModule/operations/settleTwoPartyDefault.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { createSettleTwoPartyDefaultInstruction } from '@convergence-rfq/rfq'; -import { PublicKey } from '@solana/web3.js'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - makeConfirmOptionsFinalizedOnMainnet, -} from '../../../types'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { protocolCache } from '../../protocolModule/cache'; - -const Key = 'SettleTwoPartyDefaultOperation' as const; - -/** - * Settles two party default. - * - * ```ts - * await convergence - * .rfqs() - * .settleTwoPartyDefault({ address }; - * ``` - * - * @group Operations - * @category Constructors - */ -export const settleTwoPartyDefaultOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type SettleTwoPartyDefaultOperation = Operation< - typeof Key, - SettleTwoPartyDefaultInput, - SettleTwoPartyDefaultOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type SettleTwoPartyDefaultInput = { - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** The address of the RFQ account. */ - rfq: PublicKey; - - /** The address of the response account. */ - response: PublicKey; - - /** - * Optional address of the taker collateral info account. - * - * @defaultValue `convergence.collateral().pdas().collateralInfo({ user: rfq.taker })` - * - */ - takerCollateralInfo?: PublicKey; - - /** - * Optional address of the Maker's collateral info account. - * - * @defaultValue `convergence.collateral().pdas().collateralInfo({ user: response.maker })` - * - */ - makerCollateralInfo?: PublicKey; - - /** - * Optional address of the Taker's collateral tokens account. - * - * @defaultValue `convergence.collateral().pdas(). - * collateralTokens({ - * user: rfq.taker, - * })` - */ - takerCollateralTokens?: PublicKey; - - /** - * Optional address of the Maker's collateral tokens account. - * - * @defaultValue `convergence.collateral().pdas(). - * collateralTokens({ - * user: response.maker, - * })` - */ - makerCollateralTokens?: PublicKey; - - /** - * Optional address of the DAO's collateral tokens account. - * - * @defaultValue `convergence.collateral().pdas(). - * collateralTokens({ - * user: dao - * })` - */ - protocolCollateralTokens?: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type SettleTwoPartyDefaultOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const settleTwoPartyDefaultOperationHandler: OperationHandler = - { - handle: async ( - operation: SettleTwoPartyDefaultOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const builder = await settleTwoPartyDefaultBuilder( - convergence, - { - ...operation.input, - }, - scope - ); - scope.throwIfCanceled(); - - const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( - convergence, - scope.confirmOptions - ); - - const output = await builder.sendAndConfirm(convergence, confirmOptions); - scope.throwIfCanceled(); - - return { ...output }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type SettleTwoPartyDefaultBuilderParams = SettleTwoPartyDefaultInput; - -/** - * Settles two party default - * - * ```ts - * const transactionBuilder = convergence - * .rfqs() - * .builders() - * .settleTwoPartyDefault({ address }); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const settleTwoPartyDefaultBuilder = async ( - convergence: Convergence, - params: SettleTwoPartyDefaultBuilderParams, - options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { rfq, response } = params; - - const rfqProgram = convergence.programs().getRfq(programs); - const tokenProgram = convergence.programs().getToken(programs); - - const protocol = await protocolCache.get(convergence); - - const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); - const responseModel = await convergence - .rfqs() - .findResponseByAddress({ address: response }); - - let { - takerCollateralInfo, - makerCollateralInfo, - takerCollateralTokens, - makerCollateralTokens, - protocolCollateralTokens, - } = params; - - const takerCollateralInfoPda = convergence - .collateral() - .pdas() - .collateralInfo({ - user: rfqModel.taker, - programs, - }); - const makerCollateralInfoPda = convergence - .collateral() - .pdas() - .collateralInfo({ - user: responseModel.maker, - programs, - }); - const takerCollateralTokensPda = convergence - .collateral() - .pdas() - .collateralToken({ - user: rfqModel.taker, - programs, - }); - const makerCollateralTokensPda = convergence - .collateral() - .pdas() - .collateralToken({ - user: responseModel.maker, - programs, - }); - const protocolCollateralTokensPda = convergence - .collateral() - .pdas() - .collateralToken({ - user: protocol.authority, - programs, - }); - - takerCollateralInfo = takerCollateralInfo ?? takerCollateralInfoPda; - makerCollateralInfo = makerCollateralInfo ?? makerCollateralInfoPda; - takerCollateralTokens = takerCollateralTokens ?? takerCollateralTokensPda; - makerCollateralTokens = makerCollateralTokens ?? makerCollateralTokensPda; - protocolCollateralTokens = - protocolCollateralTokens ?? protocolCollateralTokensPda; - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createSettleTwoPartyDefaultInstruction( - { - protocol: protocol.address, - rfq, - response, - takerCollateralInfo, - makerCollateralInfo, - takerCollateralTokens, - makerCollateralTokens, - protocolCollateralTokens, - tokenProgram: tokenProgram.address, - }, - rfqProgram.address - ), - signers: [], - key: 'settleTwoPartyDefault', - }); -}; diff --git a/packages/js/src/plugins/rfqModule/operations/unlockResponseCollateral.ts b/packages/js/src/plugins/rfqModule/operations/unlockResponseCollateral.ts deleted file mode 100644 index 9eb386ba5..000000000 --- a/packages/js/src/plugins/rfqModule/operations/unlockResponseCollateral.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { createUnlockResponseCollateralInstruction } from '@convergence-rfq/rfq'; - -import { - Operation, - OperationHandler, - OperationScope, - useOperation, -} from '../../../types'; -import { Convergence } from '../../../Convergence'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { protocolCache } from '../../protocolModule/cache'; -import { SendAndConfirmTransactionResponse } from '@/plugins'; - -const Key = 'unlockResponseCollateralOperation' as const; - -/** - * Unlocks collateral for a Response - * - * ```ts - * await convergence - * .rfqs() - * .unlockResponseCollateral({ - * response: , - * }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const unlockResponseCollateralOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type UnlockResponseCollateralOperation = Operation< - typeof Key, - UnlockResponseCollateralInput, - UnlockResponseCollateralOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type UnlockResponseCollateralInput = { - /** - * The response address. - */ - response: PublicKey; - - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type UnlockResponseCollateralOutput = { - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const unlockResponseCollateralOperationHandler: OperationHandler = - { - handle: async ( - operation: UnlockResponseCollateralOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const builder = await unlockResponseCollateralBuilder( - convergence, - { - ...operation.input, - }, - scope - ); - - const output = await builder.sendAndConfirm( - convergence, - scope.confirmOptions - ); - scope.throwIfCanceled(); - - return output; - }, - }; - -export type UnlockResponseCollateralBuilderParams = - UnlockResponseCollateralInput; - -/** - * UnlockRfqs a collateral account. - * - * ```ts - * const transactionBuilder = await convergence - * .rfqs() - * .builders() - * .unlockResponseCollateral(); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const unlockResponseCollateralBuilder = async ( - convergence: Convergence, - params: UnlockResponseCollateralBuilderParams, - options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { response } = params; - - const protocol = await protocolCache.get(convergence); - - const responseModel = await convergence - .rfqs() - .findResponseByAddress({ address: response }); - - const { taker } = await convergence - .rfqs() - .findRfqByAddress({ address: responseModel.rfq }); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createUnlockResponseCollateralInstruction( - { - rfq: responseModel.rfq, - response: responseModel.address, - protocol: convergence.protocol().pdas().protocol(), - takerCollateralInfo: convergence.collateral().pdas().collateralInfo({ - user: taker, - programs, - }), - makerCollateralInfo: convergence.collateral().pdas().collateralInfo({ - user: responseModel.maker, - programs, - }), - takerCollateralTokens: convergence - .collateral() - .pdas() - .collateralToken({ - user: taker, - programs, - }), - makerCollateralTokens: convergence - .collateral() - .pdas() - .collateralToken({ - user: responseModel.maker, - programs, - }), - protocolCollateralTokens: convergence - .collateral() - .pdas() - .collateralToken({ - user: protocol.authority, - programs, - }), - }, - convergence.programs().getRfq(programs).address - ), - signers: [], - key: 'unlockeResponseCollateral', - }); -}; diff --git a/packages/js/src/plugins/rfqModule/operations/unlockResponsesCollateral.ts b/packages/js/src/plugins/rfqModule/operations/unlockResponsesCollateral.ts deleted file mode 100644 index 682c7cccc..000000000 --- a/packages/js/src/plugins/rfqModule/operations/unlockResponsesCollateral.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; - -import { - Operation, - OperationHandler, - OperationScope, - useOperation, -} from '../../../types'; -import { Convergence } from '../../../Convergence'; -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { unlockResponseCollateralBuilder } from './unlockResponseCollateral'; - -const Key = 'unlockResponsesCollateralOperation' as const; - -/** - * Unlocks collateral for a Response - * - * ```ts - * await convergence - * .rfqs() - * .unlockResponseCollateral({ - * responses: [], - * }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const unlockResponsesCollateralOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type UnlockResponsesCollateralOperation = Operation< - typeof Key, - UnlockResponsesCollateralInput, - UnlockResponsesCollateralOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type UnlockResponsesCollateralInput = { - /** - * The response address. - */ - responses: PublicKey[]; - - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type UnlockResponsesCollateralOutput = { - responses: SendAndConfirmTransactionResponse[]; -}; - -/** - * @group Operations - * @category Handlers - */ -export const unlockResponsesCollateralOperationHandler: OperationHandler = - { - handle: async ( - operation: UnlockResponsesCollateralOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const { responses: rfqResponses } = operation.input; - - const builders = await Promise.all( - rfqResponses.map((response) => - unlockResponseCollateralBuilder( - convergence, - { response, ...operation.input }, - scope - ) - ) - ); - const lastValidBlockHeight = await convergence.rpc().getLatestBlockhash(); - const signedTxs = await convergence - .identity() - .signAllTransactions( - builders.map((b) => b.toTransaction(lastValidBlockHeight)) - ); - - const responses = await Promise.all( - signedTxs.map((signedTx) => - convergence - .rpc() - .serializeAndSendTransaction( - signedTx, - lastValidBlockHeight, - scope.confirmOptions - ) - ) - ); - scope.throwIfCanceled(); - - return { responses }; - }, - }; diff --git a/packages/js/src/plugins/rfqModule/operations/unlockRfqCollateral.ts b/packages/js/src/plugins/rfqModule/operations/unlockRfqCollateral.ts deleted file mode 100644 index b77adc208..000000000 --- a/packages/js/src/plugins/rfqModule/operations/unlockRfqCollateral.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { createUnlockRfqCollateralInstruction } from '@convergence-rfq/rfq'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, -} from '../../../types'; -import { Convergence } from '../../../Convergence'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; - -const Key = 'UnlockRfqCollateralOperation' as const; - -/** - * Unlocks collateral for an Rfq - * - * ```ts - * const rfq = await convergence - * .rfqs() - * .unlockRfqCollateral({ rfq: rfq.address }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const unlockRfqCollateralOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type UnlockRfqCollateralOperation = Operation< - typeof Key, - UnlockRfqCollateralInput, - UnlockRfqCollateralOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type UnlockRfqCollateralInput = { - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** The address of the Rfq account. */ - rfq: PublicKey; - - /** - * Optional address of the Taker's collateral info account. - * - * @defaultValue `convergence.collateral().pdas().collateralInfo({ user: rfq.taker })` - * - */ - collateralInfo?: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type UnlockRfqCollateralOutput = { - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const unlockRfqCollateralOperationHandler: OperationHandler = - { - handle: async ( - operation: UnlockRfqCollateralOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const builder = await unlockRfqCollateralBuilder( - convergence, - { - ...operation.input, - }, - scope - ); - - const output = await builder.sendAndConfirm( - convergence, - scope.confirmOptions - ); - scope.throwIfCanceled(); - - return output; - }, - }; - -export type UnlockRfqCollateralBuilderParams = UnlockRfqCollateralInput; - -/** - * @group Transaction Builders - * @category Contexts - */ -export type UnlockRfqCollateralBuilderContext = - SendAndConfirmTransactionResponse; - -/** - * UnlockRfqs a collateral account. - * - * ```ts - * const transactionBuilder = await convergence - * .rfqs() - * .builders() - * .unlockRfqCollateral(); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const unlockRfqCollateralBuilder = async ( - convergence: Convergence, - params: UnlockRfqCollateralBuilderParams, - options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { rfq } = params; - - let { collateralInfo } = params; - - const rfqProgram = convergence.programs().getRfq(programs); - - const rfqModel = await convergence.rfqs().findRfqByAddress({ address: rfq }); - - const collateralInfoPda = convergence.collateral().pdas().collateralInfo({ - user: rfqModel.taker, - programs, - }); - - collateralInfo = collateralInfo ?? collateralInfoPda; - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createUnlockRfqCollateralInstruction( - { - protocol: convergence.protocol().pdas().protocol(), - rfq, - collateralInfo, - }, - rfqProgram.address - ), - signers: [], - key: 'unlockRfqCollateral', - }); -}; diff --git a/packages/js/src/plugins/rfqModule/operations/unlockRfqsCollateral.ts b/packages/js/src/plugins/rfqModule/operations/unlockRfqsCollateral.ts deleted file mode 100644 index 720409a95..000000000 --- a/packages/js/src/plugins/rfqModule/operations/unlockRfqsCollateral.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, -} from '../../../types'; -import { Convergence } from '../../../Convergence'; -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { unlockRfqCollateralBuilder } from './unlockRfqCollateral'; - -const Key = 'UnlockRfqsCollateralOperation' as const; - -/** - * Unlocks collateral for multiples Rfqs - * - * ```ts - * const rfq = await convergence - * .rfqs() - * .unlockRfqsCollateral({ rfqs: [rfq.address, rfq2.address,...] }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const unlockRfqsCollateralOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type UnlockRfqsCollateralOperation = Operation< - typeof Key, - UnlockRfqsCollateralInput, - UnlockRfqsCollateralOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type UnlockRfqsCollateralInput = { - /** - * The protocol address. - * - * @defaultValue `convergence.protocol().pdas().protocol()` - */ - protocol?: PublicKey; - - /** The address of the Rfq account. */ - rfqs: PublicKey[]; - - /** - * Optional address of the Taker's collateral info account. - * - * @defaultValue `convergence.collateral().pdas().collateralInfo({ user: rfq.taker })` - * - */ - collateralInfo?: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type UnlockRfqsCollateralOutput = { - responses: SendAndConfirmTransactionResponse[]; -}; - -/** - * @group Operations - * @category Handlers - */ -export const unlockRfqsCollateralOperationHandler: OperationHandler = - { - handle: async ( - operation: UnlockRfqsCollateralOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const { rfqs } = operation.input; - const builders = await Promise.all( - rfqs.map((rfq) => - unlockRfqCollateralBuilder( - convergence, - { - ...operation.input, - rfq, - }, - scope - ) - ) - ); - - const lastValidBlockHeight = await convergence.rpc().getLatestBlockhash(); - const signedTxs = await convergence - .identity() - .signAllTransactions( - builders.map((b) => b.toTransaction(lastValidBlockHeight)) - ); - - const responses = await Promise.all( - signedTxs.map((signedTx) => - convergence - .rpc() - .serializeAndSendTransaction( - signedTx, - lastValidBlockHeight, - scope.confirmOptions - ) - ) - ); - scope.throwIfCanceled(); - - return { responses }; - }, - }; diff --git a/packages/js/src/plugins/rfqModule/plugin.ts b/packages/js/src/plugins/rfqModule/plugin.ts index ef9d2b5a0..0a54d8e3e 100644 --- a/packages/js/src/plugins/rfqModule/plugin.ts +++ b/packages/js/src/plugins/rfqModule/plugin.ts @@ -37,42 +37,30 @@ import { findRfqByAddressOperationHandler, findRfqsOperation, findRfqsOperationHandler, - partiallySettleLegsOperation, - partiallySettleLegsOperationHandler, prepareMoreLegsSettlementOperation, prepareMoreLegsSettlementOperationHandler, partlyRevertSettlementPreparationOperation, partlyRevertSettlementPreparationOperationHandler, - partiallySettleLegsAndSettleOperation, - partiallySettleLegsAndSettleOperationHandler, prepareSettlementOperation, prepareSettlementOperationHandler, prepareSettlementAndPrepareMoreLegsOperation, prepareSettlementAndPrepareMoreLegsOperationHandler, settleOperation, settleOperationHandler, - settleOnePartyDefaultOperation, - settleOnePartyDefaultOperationHandler, - settleTwoPartyDefaultOperation, - settleTwoPartyDefaultOperationHandler, - unlockRfqCollateralOperation, - unlockRfqCollateralOperationHandler, createAndFinalizeRfqConstructionOperation, createAndFinalizeRfqConstructionOperationHandler, cancelRfqsOperation, cancelRfqsOperationHandler, cancelResponsesOperation, cancelResponsesOperationHandler, - unlockResponseCollateralOperation, - unlockResponseCollateralOperationHandler, - unlockResponsesCollateralOperation, - unlockResponsesCollateralOperationHandler, - unlockRfqsCollateralOperation, - unlockRfqsCollateralOperationHandler, cleanUpRfqsOperation, cleanUpRfqsOperationHandler, getSettlementResultOperation, getSettlementResultHandler, + createPrintTradeRfqOperation, + createPrintTradeRfqOperationHandler, + preparePrintTradeSettlementOperationHandler, + preparePrintTradeSettlementOperation, getResponseStateAndActionOperation, getResponseStateAndActionHandler, } from './operations'; @@ -114,6 +102,10 @@ export const rfqModule = (): ConvergencePlugin => ({ createAndFinalizeRfqConstructionOperation, createAndFinalizeRfqConstructionOperationHandler ); + op.register( + createPrintTradeRfqOperation, + createPrintTradeRfqOperationHandler + ); op.register( finalizeRfqConstructionOperation, finalizeRfqConstructionOperationHandler @@ -132,10 +124,6 @@ export const rfqModule = (): ConvergencePlugin => ({ ); op.register(findRfqByAddressOperation, findRfqByAddressOperationHandler); op.register(findRfqsOperation, findRfqsOperationHandler); - op.register( - partiallySettleLegsOperation, - partiallySettleLegsOperationHandler - ); op.register( partlyRevertSettlementPreparationOperation, partlyRevertSettlementPreparationOperationHandler @@ -145,48 +133,20 @@ export const rfqModule = (): ConvergencePlugin => ({ prepareMoreLegsSettlementOperationHandler ); op.register(prepareSettlementOperation, prepareSettlementOperationHandler); - op.register(respondToRfqOperation, respondToRfqOperationHandler); - op.register(settleOperation, settleOperationHandler); - op.register( - settleOnePartyDefaultOperation, - settleOnePartyDefaultOperationHandler - ); - op.register( - settleTwoPartyDefaultOperation, - settleTwoPartyDefaultOperationHandler - ); - op.register( - unlockResponseCollateralOperation, - unlockResponseCollateralOperationHandler - ); op.register( - unlockRfqCollateralOperation, - unlockRfqCollateralOperationHandler + preparePrintTradeSettlementOperation, + preparePrintTradeSettlementOperationHandler ); + op.register(respondToRfqOperation, respondToRfqOperationHandler); + op.register(settleOperation, settleOperationHandler); op.register( prepareSettlementAndPrepareMoreLegsOperation, prepareSettlementAndPrepareMoreLegsOperationHandler ); - op.register( - partiallySettleLegsAndSettleOperation, - partiallySettleLegsAndSettleOperationHandler - ); op.register(cancelRfqsOperation, cancelRfqsOperationHandler); op.register(cancelResponsesOperation, cancelResponsesOperationHandler); op.register(cleanUpResponseOperation, cleanUpResponseOperationHandler); op.register(cleanUpRfqsOperation, cleanUpRfqsOperationHandler); - op.register( - unlockResponseCollateralOperation, - unlockResponseCollateralOperationHandler - ); - op.register( - unlockResponsesCollateralOperation, - unlockResponsesCollateralOperationHandler - ); - op.register( - unlockRfqsCollateralOperation, - unlockRfqsCollateralOperationHandler - ); op.register(getSettlementResultOperation, getSettlementResultHandler); op.register( getResponseStateAndActionOperation, diff --git a/packages/js/src/plugins/riskEngineModule/RiskEngineClient.ts b/packages/js/src/plugins/riskEngineModule/RiskEngineClient.ts index a5b877fac..55648560b 100644 --- a/packages/js/src/plugins/riskEngineModule/RiskEngineClient.ts +++ b/packages/js/src/plugins/riskEngineModule/RiskEngineClient.ts @@ -1,23 +1,11 @@ import { - initializeConfigOperation, - InitializeConfigInput, - updateConfigOperation, - UpdateConfigInput, - SetInstrumentTypeInput, - setInstrumentTypeOperation, calculateCollateralForConfirmationOperation, calculateCollateralForResponseOperation, calculateCollateralForRfqOperation, CalculateCollateralForConfirmationInput, CalculateCollateralForRfqInput, CalculateCollateralForResponseInput, - setRiskCategoriesInfoOperation, - SetRiskCategoriesInfoInput, - fetchConfigOperation, - CloseConfigInput, - closeConfigOperation, } from './operations'; -import { RiskEnginePdasClient } from './RiskEnginePdasClient'; import type { Convergence } from '@/Convergence'; import { OperationOptions } from '@/types'; @@ -36,55 +24,6 @@ import { OperationOptions } from '@/types'; export class RiskEngineClient { constructor(protected readonly convergence: Convergence) {} - /** - * You may use the `pdas()` client to build PDAs related to this module. - * - * ```ts - * const pdasClient = convergence.riskEngine().pdas(); - * ``` - */ - pdas() { - return new RiskEnginePdasClient(this.convergence); - } - - /** {@inheritDoc initializeConfig} */ - initializeConfig(input?: InitializeConfigInput, options?: OperationOptions) { - return this.convergence - .operations() - .execute(initializeConfigOperation(input), options); - } - - /** {@inheritDoc updateConfig} */ - updateConfig(input?: UpdateConfigInput, options?: OperationOptions) { - return this.convergence - .operations() - .execute(updateConfigOperation(input), options); - } - - /** {@inheritDoc closeConfig} */ - closeConfig(input?: CloseConfigInput, options?: OperationOptions) { - return this.convergence - .operations() - .execute(closeConfigOperation(input), options); - } - - /** {@inheritDoc setInstrumentTypeOperation} */ - setInstrumentType(input: SetInstrumentTypeInput, options?: OperationOptions) { - return this.convergence - .operations() - .execute(setInstrumentTypeOperation(input), options); - } - - /** {@inheritDoc setRiskCategoriesInfoOperation} */ - setRiskCategoriesInfo( - input: SetRiskCategoriesInfoInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(setRiskCategoriesInfoOperation(input), options); - } - /** {@inheritDoc calculateCollateralForRfq} */ calculateCollateralForRfq( input: CalculateCollateralForRfqInput, @@ -114,11 +53,4 @@ export class RiskEngineClient { .operations() .execute(calculateCollateralForConfirmationOperation(input), options); } - - /** {@inheritDoc fetchConfig} */ - fetchConfig(options?: OperationOptions) { - return this.convergence - .operations() - .execute(fetchConfigOperation({}), options); - } } diff --git a/packages/js/src/plugins/riskEngineModule/RiskEnginePdasClient.ts b/packages/js/src/plugins/riskEngineModule/RiskEnginePdasClient.ts deleted file mode 100644 index e6c30ff06..000000000 --- a/packages/js/src/plugins/riskEngineModule/RiskEnginePdasClient.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Buffer } from 'buffer'; - -import type { Convergence } from '../../Convergence'; -import { Pda, Program } from '../../types'; - -/** - * This client allows you to build PDAs related to the protocol module. - * - * @see {@link RiskEnginePdasClient} - * @group Module Pdas - */ -export class RiskEnginePdasClient { - constructor(protected readonly convergence: Convergence) {} - - /** Finds the Config PDA. */ - config(): Pda { - const programId = this.programId(); - return Pda.find(programId, [Buffer.from('config', 'utf8')]); - } - - private programId(programs?: Program[]) { - return this.convergence.programs().getRiskEngine(programs).address; - } -} diff --git a/packages/js/src/plugins/riskEngineModule/accounts.ts b/packages/js/src/plugins/riskEngineModule/accounts.ts deleted file mode 100644 index e34e14898..000000000 --- a/packages/js/src/plugins/riskEngineModule/accounts.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Config } from '@convergence-rfq/risk-engine'; - -import { - Account, - getAccountParsingAndAssertingFunction, - getAccountParsingFunction, -} from '../../types'; - -/** @group Accounts */ -export type ConfigAccount = Account; - -/** @group Account Helpers */ -export const parseConfigAccount = getAccountParsingFunction(Config); - -/** @group Account Helpers */ -export const toConfigAccount = getAccountParsingAndAssertingFunction(Config); diff --git a/packages/js/src/plugins/riskEngineModule/cache.ts b/packages/js/src/plugins/riskEngineModule/cache.ts deleted file mode 100644 index 82b496118..000000000 --- a/packages/js/src/plugins/riskEngineModule/cache.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Convergence } from '../../Convergence'; -import { useCache } from '../../utils'; -import { toConfigAccount } from './accounts'; -import { assertConfig, toConfig } from './models'; - -export const riskEngineConfigCache = useCache( - async (cvg: Convergence, commitment = 'confirmed') => { - const account = await cvg - .rpc() - .getAccount(cvg.riskEngine().pdas().config(), commitment); - - const config = toConfig(toConfigAccount(account)); - assertConfig(config); - - return config; - } -); diff --git a/packages/js/src/plugins/riskEngineModule/clientCollateralCalculator.ts b/packages/js/src/plugins/riskEngineModule/clientCollateralCalculator.ts deleted file mode 100644 index 297e8b5ee..000000000 --- a/packages/js/src/plugins/riskEngineModule/clientCollateralCalculator.ts +++ /dev/null @@ -1,482 +0,0 @@ -import { RiskCategory } from '@convergence-rfq/rfq'; -import { - futureCommonDataBeet, - InstrumentType, - optionCommonDataBeet, - OptionType, - RiskCategoryInfo, - Scenario, -} from '@convergence-rfq/risk-engine'; -import { Commitment, PublicKey } from '@solana/web3.js'; -// @ts-ignore this package is missing type declarations -import { blackScholes } from 'black-scholes'; - -import { Convergence } from '../../Convergence'; -import { toSolitaRiskCategory } from '../protocolModule'; -import { LegInstrument } from '../instrumentModule'; -import { AuthoritySide } from '../rfqModule/models/AuthoritySide'; -import { ResponseSide } from '../rfqModule'; -import { AggregatorAccount } from './switchboard/aggregatorAccount'; -import { AggregatorAccountData } from './switchboard/types/aggregatorAccountData'; -import { Config } from './models'; -import { - FUTURE_UNDERLYING_AMOUNT_PER_CONTRACT_DECIMALS, - SETTLEMENT_WINDOW_BREAKPOINS, - SETTLEMENT_WINDOW_PEDIODS, -} from './constants'; -import { removeDecimals } from '@/utils/conversions'; - -export type CalculationCase = { - legsMultiplier: number; - authoritySide: AuthoritySide; - quoteSide: ResponseSide; -}; - -type PortfolioStatistics = { - maxLoss: number; - maxProfit: number; -}; - -type BaseAssetStatistics = { - biggestLoss: number; - biggestProfit: number; - absoluteValueOfLegs: number; -}; - -type BaseAssetInfo = { - index: number; - riskCategory: RiskCategory; - price: number; -}; - -type LegInfo = { - baseAssetIndex: number; - amount: number; - instrumentType: InstrumentType; - data: Buffer; -}; - -export async function calculateRisk( - convergence: Convergence, - config: Config, - legs: LegInstrument[], - cases: CalculationCase[], - settlementPeriod: number, - commitment?: Commitment -) { - const baseAssetIds = new Set( - legs.map((leg) => leg.getBaseAssetIndex().value) - ); // select unique base asset ids - const baseAssetInfos = await Promise.all( - Array.from(baseAssetIds).map((id) => - fetchBaseAssetInfo(convergence, id, commitment) - ) - ); - const instrumentTypesMapping = config.instrumentTypes; - - const legInfos = legs.map((leg) => { - let amount = leg.getAmount(); - if (leg.getSide() == 'long') { - amount = -amount; - } - - const assetType = instrumentTypesMapping.find((entry) => - entry.program.equals(leg.getProgramId()) - )?.rType; - - if (assetType === undefined) { - throw Error( - `Instrument ${leg - .getProgramId() - .toString()} is missing from risk engine config!` - ); - } - - return { - baseAssetIndex: leg.getBaseAssetIndex().value, - amount, - instrumentType: assetType, - data: Buffer.from(leg.serializeInstrumentData()), - }; - }); - - const statistics = calculatePortfolioStatistics( - legInfos, - config, - baseAssetInfos, - settlementPeriod - ); - - const results: number[] = []; - for (const calculationCase of cases) { - results.push(calculateRiskInner(statistics, calculationCase, config)); - } - - return results; -} - -function calculateRiskInner( - statistics: PortfolioStatistics, - calculationCase: CalculationCase, - config: Config -): number { - let portfolioInverted = false; - - if (calculationCase.quoteSide.hasOwnProperty('bid')) { - portfolioInverted = !portfolioInverted; - } - - if (calculationCase.authoritySide.hasOwnProperty('taker')) { - portfolioInverted = !portfolioInverted; - } - - let portfolioRisk = portfolioInverted - ? statistics.maxProfit - : statistics.maxLoss; - portfolioRisk = Math.max(portfolioRisk, 0); // risk can't be lower that 0 - - return Math.max( - portfolioRisk * calculationCase.legsMultiplier, - removeDecimals( - config.minCollateralRequirement, - Number(config.collateralMintDecimals) - ) - ); -} - -async function fetchBaseAssetInfo( - convergence: Convergence, - baseAssetIndex: number, - commitment?: Commitment -): Promise { - const address = convergence - .protocol() - .pdas() - .baseAsset({ index: baseAssetIndex }); - const baseAsset = await convergence - .protocol() - .findBaseAssetByAddress({ address }); - - if (!baseAsset.priceOracle.address) { - throw new Error('Price oracle address is missing'); - } - - const price = await fetchLatestOraclePrice( - convergence, - baseAsset.priceOracle.address, - commitment - ); - - return { - index: baseAssetIndex, - riskCategory: toSolitaRiskCategory(baseAsset.riskCategory), - price, - }; -} - -async function fetchLatestOraclePrice( - convergence: Convergence, - aggregatorPubkey: PublicKey, - commitment?: Commitment -) { - // TODO: Use retry method - const aggregatorAccount = await convergence.connection.getAccountInfo( - aggregatorPubkey, - commitment - ); - - if (aggregatorAccount === null) { - throw Error( - `Expected price aggregator at address ${aggregatorPubkey}, but the account is missing` - ); - } - - const aggregatorData = AggregatorAccountData.decode(aggregatorAccount.data); - const decodedPrice = AggregatorAccount.decodeLatestValue(aggregatorData); - - if (decodedPrice === null) { - throw Error( - `Price from the aggregator at address ${aggregatorPubkey} can't be parsed!` - ); - } - - return decodedPrice.toNumber(); -} - -function calculatePortfolioStatistics( - legs: LegInfo[], - config: Config, - baseAssetInfos: BaseAssetInfo[], - settlementPeriod: number -): PortfolioStatistics { - let allProfits = 0.0; - let allLosses = 0.0; - let totalLegValues = 0.0; - - for (const baseAsset of baseAssetInfos) { - const { biggestLoss, biggestProfit, absoluteValueOfLegs } = - calculateStatisticsForBaseAsset( - legs, - config, - baseAsset, - settlementPeriod - ); - - allProfits += biggestProfit; - allLosses -= biggestLoss; - totalLegValues += absoluteValueOfLegs; - } - - const priceShift = totalLegValues * config.safetyPriceShiftFactor; - - allProfits += priceShift; - allLosses += priceShift; - allProfits = applyOverallRiskFactor(allProfits, config); - allLosses = applyOverallRiskFactor(allLosses, config); - - return { - maxLoss: allLosses, - maxProfit: allProfits, - }; -} - -function applyOverallRiskFactor(value: number, config: Config): number { - return value * (config.overallSafetyFactor + 1.0); -} - -function calculateStatisticsForBaseAsset( - allLegs: LegInfo[], - config: Config, - baseAssetInfo: BaseAssetInfo, - settlementPeriod: number -): BaseAssetStatistics { - const legs = allLegs.filter( - (leg) => leg.baseAssetIndex == baseAssetInfo.index - ); - const riskCategoryInfo = - config.riskCategoriesInfo[baseAssetInfo.riskCategory]; - - const legValues = legs.map((leg) => - calculateCurrentValue(leg, baseAssetInfo.price, riskCategoryInfo) - ); - const scenarios = selectScenarios(legs, riskCategoryInfo, settlementPeriod); - - let biggestProfit = Number.MIN_VALUE; - let biggestLoss = Number.MAX_VALUE; - for (const scenario of scenarios) { - const pnl = calculateScenario( - legs, - legValues, - scenario, - baseAssetInfo.price, - riskCategoryInfo - ); - - biggestProfit = Math.max(biggestProfit, pnl); - biggestLoss = Math.min(biggestLoss, pnl); - } - - const absoluteValueOfLegs = legValues - .map((value) => Math.abs(value)) - .reduce((x, y) => x + y, 0); - - return { - biggestProfit, - biggestLoss, - absoluteValueOfLegs, - }; -} - -function calculateCurrentValue( - leg: LegInfo, - price: number, - riskCategoryInfo: RiskCategoryInfo -) { - return calculateAssetValue( - leg, - price, - riskCategoryInfo.annualized30DayVolatility, - riskCategoryInfo.interestRate - ); -} - -function calculateAssetValue( - leg: LegInfo, - price: number, - annualized30DayVolatility: number, - interestRate: number -): number { - const unitValue = calculateAssetUnitValue( - leg, - price, - annualized30DayVolatility, - interestRate - ); - - return unitValue * leg.amount; -} - -function calculateAssetUnitValue( - leg: LegInfo, - price: number, - annualized30DayVolatility: number, - interestRate: number -): number { - switch (leg.instrumentType) { - case InstrumentType.Spot: - return price; - case InstrumentType.TermFuture: - case InstrumentType.PerpFuture: - const [futureCommonData] = futureCommonDataBeet.deserialize(leg.data); - const amountPerContract = - Number(futureCommonData.underlyingAmountPerContract) / - 10 ** FUTURE_UNDERLYING_AMOUNT_PER_CONTRACT_DECIMALS; - return price * amountPerContract; - case InstrumentType.Option: - const [optionCommonData] = optionCommonDataBeet.deserialize(leg.data); - const optionType = - optionCommonData.optionType == OptionType.Call ? 'call' : 'put'; - - const underlyingAmountPerContract = - Number(optionCommonData.underlyingAmountPerContract) / - 10 ** optionCommonData.underlyingAmoundPerContractDecimals; - - const strikePrice = - Number(optionCommonData.strikePrice) / - 10 ** optionCommonData.strikePriceDecimals; - - const expirationTimestamp = Number(optionCommonData.expirationTimestamp); - - const currentTimestamp = Math.floor(Date.now() / 1000); - const secondsTillExpiration = Math.max( - 0, - expirationTimestamp - currentTimestamp - ); - const secondsInYear = 365 * 24 * 60 * 60; - const yearsTillExpiration = secondsTillExpiration / secondsInYear; - - const optionPrice = blackScholes( - price, - strikePrice, - yearsTillExpiration, - annualized30DayVolatility, - interestRate, - optionType - ); - - return optionPrice * underlyingAmountPerContract; - } -} - -function selectScenarios( - legs: LegInfo[], - riskCategoryInfo: RiskCategoryInfo, - settlementPeriod: number -): Scenario[] { - const haveOptionLegs = - legs.filter((leg) => leg.instrumentType == InstrumentType.Option).length > - 0; - - const getScenarioIndex = (settlementPeriod: number) => { - for (let i = 0; i < SETTLEMENT_WINDOW_BREAKPOINS.length; i++) { - const breakpoint = SETTLEMENT_WINDOW_BREAKPOINS[i]; - if (settlementPeriod < breakpoint) { - return i; - } - } - - return SETTLEMENT_WINDOW_PEDIODS - 1; - }; - - const scenarioIndex = getScenarioIndex(settlementPeriod); - const baseScenario = - riskCategoryInfo.scenarioPerSettlementPeriod[scenarioIndex]; - - const scenarioConstructor = ( - baseAssetPriceChange: number, - volatilityChange: number - ) => { - return { baseAssetPriceChange, volatilityChange }; - }; - - if (haveOptionLegs) { - return [ - baseScenario, - scenarioConstructor( - baseScenario.baseAssetPriceChange, - -baseScenario.volatilityChange - ), - scenarioConstructor( - -baseScenario.baseAssetPriceChange, - baseScenario.volatilityChange - ), - scenarioConstructor( - -baseScenario.baseAssetPriceChange, - -baseScenario.volatilityChange - ), - ]; - } - - return [ - scenarioConstructor(baseScenario.baseAssetPriceChange, 0.0), - scenarioConstructor(-baseScenario.baseAssetPriceChange, 0.0), - ]; -} - -function calculateScenario( - legs: LegInfo[], - legValues: number[], - scenario: Scenario, - price: number, - riskCategoryInfo: RiskCategoryInfo -): number { - let totalPnl = 0.0; - - for (const [index, leg] of legs.entries()) { - const pnl = calculateLegPnl( - leg, - legValues[index], - scenario, - price, - riskCategoryInfo - ); - totalPnl += pnl; - } - - return totalPnl; -} - -function calculateLegPnl( - leg: LegInfo, - legValue: number, - scenario: Scenario, - price: number, - riskCategoryInfo: RiskCategoryInfo -): number { - const shockedValue = calculateShockedValue( - leg, - scenario, - price, - riskCategoryInfo - ); - return shockedValue - legValue; -} - -function calculateShockedValue( - leg: LegInfo, - scenario: Scenario, - price: number, - riskCategoryInfo: RiskCategoryInfo -): number { - const shockedPrice = price * (scenario.baseAssetPriceChange + 1.0); - const shockedVolatility = - riskCategoryInfo.annualized30DayVolatility * - (scenario.volatilityChange + 1.0); - - return calculateAssetValue( - leg, - shockedPrice, - shockedVolatility, - riskCategoryInfo.interestRate - ); -} diff --git a/packages/js/src/plugins/riskEngineModule/constants.ts b/packages/js/src/plugins/riskEngineModule/constants.ts deleted file mode 100644 index 656385178..000000000 --- a/packages/js/src/plugins/riskEngineModule/constants.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { RiskCategoryInfo, Scenario } from '@convergence-rfq/risk-engine'; - -import { toBigNumber as tbn } from '../../types'; - -export const DEFAULT_MIN_COLLATERAL_REQUIREMENT = tbn(1_000_000_000); - -export const DEFAULT_COLLATERAL_FOR_FIXED_QUOTE_AMOUNT_RFQ = tbn(2_000_000_000); - -export const DEFAULT_MINT_DECIMALS = 9; - -export const DEFAULT_SAFETY_PRICE_SHIFT_FACTOR = 0.01; - -export const DEFAULT_OVERALL_SAFETY_FACTOR = 0.1; - -export const DEFAULT_ORACLE_STALENESS = 300; - -export const DEFAULT_ACCEPTED_ORACLE_CONFIDENCE_INTERVAL_POSITION = 0.1; - -export const DEFAULT_ACCEPTED_ORACLE_STALENESS = 300; -export const DEFAULT_ACCEPTED_ORACLE_CONFIDENCE_INTERVAL_PORTION = 0.01; - -export const SETTLEMENT_WINDOW_PEDIODS = 6; -export const SETTLEMENT_WINDOW_BREAKPOINS = [ - 60 * 60, - 4 * 60 * 60, - 12 * 60 * 60, - 24 * 60 * 60, - 48 * 60 * 60, -]; - -export const FUTURE_UNDERLYING_AMOUNT_PER_CONTRACT_DECIMALS = 9; -export const OPTION_UNDERLYING_AMOUNT_PER_CONTRACT_DECIMALS = 9; -export const OPTION_STRIKE_PRICE_DECIMALS = 9; - -export const DEFAULT_RISK_CATEGORIES_INFO = { - veryLow: toRiskCategoryInfo(0.05, 0.5, [ - toScenario(0.02, 0.2), - toScenario(0.04, 0.3), - toScenario(0.08, 0.4), - toScenario(0.12, 0.5), - toScenario(0.2, 0.6), - toScenario(0.3, 0.7), - ]), - low: toRiskCategoryInfo(0.05, 0.8, [ - toScenario(0.04, 0.4), - toScenario(0.08, 0.6), - toScenario(0.16, 0.8), - toScenario(0.24, 1), - toScenario(0.4, 1.2), - toScenario(0.6, 1.4), - ]), - medium: toRiskCategoryInfo(0.05, 1.2, [ - toScenario(0.06, 0.6), - toScenario(0.12, 0.9), - toScenario(0.24, 1.2), - toScenario(0.36, 1.5), - toScenario(0.6, 1.8), - toScenario(0.9, 2.1), - ]), - high: toRiskCategoryInfo(0.05, 2.4, [ - toScenario(0.08, 0.8), - toScenario(0.16, 1.2), - toScenario(0.32, 1.6), - toScenario(0.48, 2), - toScenario(0.8, 2.4), - toScenario(1.2, 2.8), - ]), - veryHigh: toRiskCategoryInfo(0.05, 5, [ - toScenario(0.1, 1), - toScenario(0.2, 1.5), - toScenario(0.4, 2), - toScenario(0.6, 2.5), - toScenario(1, 3), - toScenario(1.5, 3.5), - ]), -}; - -export function toScenario( - baseAssetPriceChange: number, - volatilityChange: number -): Scenario { - return { - baseAssetPriceChange, - volatilityChange, - }; -} - -export function toRiskCategoryInfo( - interestRate: number, - annualized30DayVolatility: number, - scenarioPerSettlementPeriod: [ - Scenario, - Scenario, - Scenario, - Scenario, - Scenario, - Scenario - ] -): RiskCategoryInfo { - return { - interestRate, - annualized30DayVolatility, - scenarioPerSettlementPeriod, - }; -} diff --git a/packages/js/src/plugins/riskEngineModule/index.ts b/packages/js/src/plugins/riskEngineModule/index.ts index b5b780aad..9eb94b038 100644 --- a/packages/js/src/plugins/riskEngineModule/index.ts +++ b/packages/js/src/plugins/riskEngineModule/index.ts @@ -3,7 +3,4 @@ export * from './plugin'; export * from './RiskEngineClient'; export * from './types'; export * from './operations'; -export * from './constants'; export * from './models'; -export * from './accounts'; -export * from './cache'; diff --git a/packages/js/src/plugins/riskEngineModule/models/Config.ts b/packages/js/src/plugins/riskEngineModule/models/Config.ts deleted file mode 100644 index 438106e22..000000000 --- a/packages/js/src/plugins/riskEngineModule/models/Config.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { RiskCategoryChange as SolitaRiskCategoryChange } from '@convergence-rfq/risk-engine'; -import { bignum } from '@convergence-rfq/beet'; - -import { ConfigAccount } from '../accounts'; -import { RiskCategoryInfo, InstrumentInfo } from '../types'; -import { assert } from '../../../utils/assert'; -import { - RiskCategory, - toSolitaRiskCategory, -} from '../../protocolModule/models'; - -/** - * This model captures all the relevant information about a Risk Engine Config - * on the Solana blockchain. - * - * @group Models - */ -export type Config = { - /** A model identifier to distinguish models in the SDK. */ - readonly model: 'config'; - - /** The address of the config. */ - readonly address: PublicKey; - - /** The amount of collateral required to create an RFQ with a variable size. */ - readonly minCollateralRequirement: bignum; - - /** The amount of collateral required to create an RFQ with a fixed size. */ - readonly collateralForFixedQuoteAmountRfqCreation: bignum; - - /** The number of decimals of the collateral mint. */ - readonly collateralMintDecimals: bignum; - - /** The safety price shift factor. */ - readonly safetyPriceShiftFactor: number; - - /** The overall safety factor. */ - readonly overallSafetyFactor: number; - - /** The risk categories info. */ - readonly riskCategoriesInfo: RiskCategoryInfo[]; - - /** The instrument types info. */ - readonly instrumentTypes: InstrumentInfo[]; -}; - -export type RiskCategoryChange = { - /** The risk category index. */ - category: RiskCategory; - - /** The risk category info. */ - value: any; -}; - -/** @group Model helpers */ -export const toSolitaRiskCategoryChange = ( - change: RiskCategoryChange -): SolitaRiskCategoryChange => { - return { - riskCategoryIndex: toSolitaRiskCategory(change.category), - newValue: change.value, - }; -}; - -/** @group Model helpers */ -export const isConfig = (value: any): value is Response => - typeof value === 'object' && value.model === 'config'; - -/** @group Model helpers */ -export function assertConfig(value: any): asserts value is Response { - assert(isConfig(value), 'Expected Config model'); -} - -/** @group Model helpers */ -export const toConfig = (account: ConfigAccount): Config => ({ - model: 'config', - address: account.publicKey, - minCollateralRequirement: account.data.minCollateralRequirement, - collateralForFixedQuoteAmountRfqCreation: - account.data.collateralForFixedQuoteAmountRfqCreation, - collateralMintDecimals: account.data.collateralMintDecimals, - safetyPriceShiftFactor: account.data.safetyPriceShiftFactor, - overallSafetyFactor: account.data.overallSafetyFactor, - riskCategoriesInfo: account.data.riskCategoriesInfo, - instrumentTypes: account.data.instrumentTypes, -}); diff --git a/packages/js/src/plugins/riskEngineModule/models/InstrumentType.ts b/packages/js/src/plugins/riskEngineModule/models/InstrumentType.ts new file mode 100644 index 000000000..c894afd9e --- /dev/null +++ b/packages/js/src/plugins/riskEngineModule/models/InstrumentType.ts @@ -0,0 +1,39 @@ +export type InstrumentType = 'spot' | 'option' | 'term-future' | 'perp-future'; + +export function toNumberInstrumentType(instrumentType: InstrumentType): number { + switch (instrumentType) { + case 'spot': { + return 1; + } + case 'option': { + return 2; + } + case 'term-future': { + return 3; + } + case 'perp-future': { + return 4; + } + } +} + +export function fromNumberInstrumentType( + instrumentType: number +): InstrumentType { + switch (instrumentType) { + case 1: { + return 'spot'; + } + case 2: { + return 'option'; + } + case 3: { + return 'term-future'; + } + case 4: { + return 'perp-future'; + } + default: + throw new Error('Invalid instrument type!'); + } +} diff --git a/packages/js/src/plugins/riskEngineModule/models/index.ts b/packages/js/src/plugins/riskEngineModule/models/index.ts index bd37f302d..9b30a75e5 100644 --- a/packages/js/src/plugins/riskEngineModule/models/index.ts +++ b/packages/js/src/plugins/riskEngineModule/models/index.ts @@ -1 +1 @@ -export * from './Config'; +export * from './InstrumentType'; diff --git a/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForConfirmation.ts b/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForConfirmation.ts index 59a4029f2..c14946a7c 100644 --- a/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForConfirmation.ts +++ b/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForConfirmation.ts @@ -1,7 +1,6 @@ import { PublicKey } from '@solana/web3.js'; import { Confirmation } from '../../rfqModule/models/Confirmation'; -import { CalculationCase, calculateRisk } from '../clientCollateralCalculator'; import { Convergence } from '@/Convergence'; import { Operation, @@ -9,7 +8,6 @@ import { OperationScope, useOperation, } from '@/types'; -import { extractLegsMultiplier } from '@/plugins/rfqModule/helpers'; const Key = 'CalculateCollateralForConfirmationOperation' as const; @@ -75,48 +73,10 @@ export type CalculateCollateralForConfirmationBuilderParams = export const calculateCollateralForConfirmationOperationHandler: OperationHandler = { handle: async ( - operation: CalculateCollateralForConfirmationOperation, - convergence: Convergence, - scope: OperationScope + _operation: CalculateCollateralForConfirmationOperation, + _convergence: Convergence, + _scope: OperationScope ) => { - scope.throwIfCanceled(); - - const { rfqAddress, responseAddress, confirmation } = operation.input; - - // fetching in parallel - const [rfq, response, config] = await Promise.all([ - convergence.rfqs().findRfqByAddress({ address: rfqAddress }, scope), - convergence - .rfqs() - .findResponseByAddress({ address: responseAddress }, scope), - convergence.riskEngine().fetchConfig(scope), - ]); - - const confirmedQuote = - confirmation.side == 'bid' ? response.bid : response.ask; - if (confirmedQuote === null) { - throw Error('Cannot confirm a missing quote!'); - } - const legsMultiplier = extractLegsMultiplier( - rfq, - confirmedQuote, - confirmation - ); - const calculationCase: CalculationCase = { - legsMultiplier, - authoritySide: 'taker', - quoteSide: confirmation.side, - }; - - const [requiredCollateral] = await calculateRisk( - convergence, - config, - rfq.legs, - [calculationCase], - rfq.settlingWindow, - scope.commitment - ); - - return { requiredCollateral }; + return { requiredCollateral: 0 }; }, }; diff --git a/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForResponse.ts b/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForResponse.ts index 109eb3dbe..cbf16fde5 100644 --- a/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForResponse.ts +++ b/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForResponse.ts @@ -1,6 +1,5 @@ import { PublicKey } from '@solana/web3.js'; -import { CalculationCase, calculateRisk } from '../clientCollateralCalculator'; import { Operation, OperationHandler, @@ -8,8 +7,7 @@ import { useOperation, } from '../../../types'; import { Convergence } from '../../../Convergence'; -import { Quote, ResponseSide } from '../../rfqModule'; -import { extractLegsMultiplier } from '@/plugins/rfqModule/helpers'; +import { Quote } from '../../rfqModule'; const Key = 'CalculateCollateralForResponseOperation' as const; @@ -76,44 +74,10 @@ export type CalculateCollateralForResponseBuilderParams = export const calculateCollateralForResponseOperationHandler: OperationHandler = { handle: async ( - operation: CalculateCollateralForResponseOperation, - convergence: Convergence, - scope: OperationScope + _operation: CalculateCollateralForResponseOperation, + _convergence: Convergence, + _scope: OperationScope ): Promise => { - const { rfqAddress, bid, ask } = operation.input; - - const [rfq, config] = await Promise.all([ - convergence.rfqs().findRfqByAddress({ address: rfqAddress }, scope), - convergence.riskEngine().fetchConfig(scope), - ]); - - const getCase = (quote: Quote, side: ResponseSide): CalculationCase => { - const legsMultiplier = extractLegsMultiplier(rfq, quote); - return { - legsMultiplier, - authoritySide: 'maker', - quoteSide: side, - }; - }; - - const cases: CalculationCase[] = []; - if (bid) { - cases.push(getCase(bid, 'bid')); - } - if (ask) { - cases.push(getCase(ask, 'ask')); - } - - const risks = await calculateRisk( - convergence, - config, - rfq.legs, - cases, - rfq.settlingWindow, - scope.commitment - ); - const requiredCollateral = risks.reduce((x, y) => Math.max(x, y), 0); - - return { requiredCollateral }; + return { requiredCollateral: 0 }; }, }; diff --git a/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForRfq.ts b/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForRfq.ts index a9ce092ee..1abb4a7ba 100644 --- a/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForRfq.ts +++ b/packages/js/src/plugins/riskEngineModule/operations/calculateCollateralForRfq.ts @@ -1,10 +1,3 @@ -import { - isFixedSizeBaseAsset, - isFixedSizeOpen, - isFixedSizeQuoteAsset, -} from '../../rfqModule/models'; - -import { calculateRisk, CalculationCase } from '../clientCollateralCalculator'; import { Operation, OperationHandler, @@ -12,12 +5,9 @@ import { useOperation, } from '../../../types'; import { Convergence } from '../../../Convergence'; -import { - LegInstrument, - QuoteInstrument, -} from '../../../plugins/instrumentModule'; -import { removeDecimals } from '../../../utils/conversions'; -import { FixedSize, OrderType, ResponseSide } from '../../../plugins/rfqModule'; +import { LegInstrument } from '../../../plugins/instrumentModule'; +import { FixedSize, OrderType } from '../../../plugins/rfqModule'; +import { PrintTradeLeg } from '@/plugins/printTradeModule'; const Key = 'CalculateCollateralForRfqOperation' as const; @@ -80,12 +70,7 @@ export type CalculateCollateralForRfqInput = { /** * Legs of the RFQ being created. */ - legs: LegInstrument[]; - - /** - * Quote asset of the RFQ being created. - */ - quoteAsset: QuoteInstrument; + legs: LegInstrument[] | PrintTradeLeg[]; /** * Settlement period of the RFQ being created in seconds. @@ -99,69 +84,10 @@ export type CalculateCollateralForRfqBuilderParams = export const calculateCollateralForRfqOperationHandler: OperationHandler = { handle: async ( - operation: CalculateCollateralForRfqOperation, - convergence: Convergence, - scope: OperationScope + _operation: CalculateCollateralForRfqOperation, + _convergence: Convergence, + _scope: OperationScope ): Promise => { - const { - orderType, - legs, - settlementPeriod, - size: fixedSize, - } = operation.input; - - const config = await convergence.riskEngine().fetchConfig(scope); - if (isFixedSizeOpen(fixedSize)) { - return { - requiredCollateral: removeDecimals( - config.minCollateralRequirement, - Number(config.collateralMintDecimals) - ), - }; - } else if (isFixedSizeQuoteAsset(fixedSize)) { - return { - requiredCollateral: removeDecimals( - config.collateralForFixedQuoteAmountRfqCreation, - Number(config.collateralMintDecimals) - ), - }; - } else if (isFixedSizeBaseAsset(fixedSize)) { - const legsMultiplier = fixedSize.amount; - const sideToCase = (side: ResponseSide): CalculationCase => { - return { - legsMultiplier, - authoritySide: 'taker', - quoteSide: side, - }; - }; - - const cases: CalculationCase[] = []; - if (orderType == 'buy') { - cases.push(sideToCase('ask')); - } else if (orderType == 'sell') { - cases.push(sideToCase('bid')); - } else if (orderType == 'two-way') { - cases.push(sideToCase('ask')); - cases.push(sideToCase('bid')); - } else { - throw new Error('Invalid order type'); - } - - const risks = await calculateRisk( - convergence, - config, - legs, - cases, - settlementPeriod, - scope.commitment - ); - - const requiredCollateral = risks.reduce((x, y) => Math.max(x, y), 0); - return { - requiredCollateral, - }; - } - - throw new Error('Invalid fixed size'); + return { requiredCollateral: 0 }; }, }; diff --git a/packages/js/src/plugins/riskEngineModule/operations/closeConfig.ts b/packages/js/src/plugins/riskEngineModule/operations/closeConfig.ts deleted file mode 100644 index 614c41fe7..000000000 --- a/packages/js/src/plugins/riskEngineModule/operations/closeConfig.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { createCloseConfigInstruction } from '@convergence-rfq/risk-engine'; - -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - Signer, - useOperation, -} from '../../../types'; -import { SendAndConfirmTransactionResponse } from '../../../plugins'; -import { riskEngineConfigCache } from '../cache'; - -const Key = 'CloseConfigOperation' as const; - -/** - * Close current rist engine configuration. - * - * ```ts - * await convergence.riskEngine().closeConfig(); - * ``` - * - * @group Operations - * @category Constructors - */ -export const closeConfigOperation = useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type CloseConfigOperation = Operation< - typeof Key, - CloseConfigInput, - CloseConfigOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type CloseConfigInput = - | { - /** The owner of the protocol. */ - authority?: Signer; - } - | undefined; - -/** - * @group Operations - * @category Outputs - */ -export type CloseConfigOutput = { - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type CloseConfigBuilderParams = CloseConfigInput; - -/** - * @group Operations - * @category Handlers - */ -export const closeConfigOperationHandler: OperationHandler = - { - handle: async ( - operation: CloseConfigOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - scope.throwIfCanceled(); - - const builder = closeConfigBuilder(convergence, operation.input, scope); - const { response } = await builder.sendAndConfirm( - convergence, - scope.confirmOptions - ); - - riskEngineConfigCache.clear(); - - return { response }; - }, - }; - -/** - * Closes risk engine configuration. - * - * ```ts - * const transactionBuilder = convergence - * .rfqs() - * .builders() - * .closeConfig(); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const closeConfigBuilder = ( - convergence: Convergence, - params: CloseConfigBuilderParams, - options: TransactionBuilderOptions = {} -): TransactionBuilder => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { authority = payer } = params ?? {}; - - const riskEngineProgram = convergence.programs().getRiskEngine(programs); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createCloseConfigInstruction( - { - authority: authority.publicKey, - protocol: convergence.protocol().pdas().protocol(), - config: convergence.riskEngine().pdas().config(), - }, - riskEngineProgram.address - ), - signers: [authority], - key: 'closeConfig', - }); -}; diff --git a/packages/js/src/plugins/riskEngineModule/operations/fetchConfig.ts b/packages/js/src/plugins/riskEngineModule/operations/fetchConfig.ts deleted file mode 100644 index 8298ca6fa..000000000 --- a/packages/js/src/plugins/riskEngineModule/operations/fetchConfig.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Config } from '../models'; - -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, -} from '../../../types'; -import { riskEngineConfigCache } from '../cache'; - -const Key = 'FetchConfigOperation' as const; - -/** - * Fetch current Rist Engine configuration - * - * ```ts - * await convergence - * .riskEngine() - * .fetchConfig(); - * ``` - * - * @group Operations - * @category Constructors - */ -export const fetchConfigOperation = useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type FetchConfigOperation = Operation< - typeof Key, - FetchConfigInput, - FetchConfigOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type FetchConfigInput = {}; - -/** - * @group Operations - * @category Outputs - */ -export type FetchConfigOutput = Config; - -/** - * @group Operations - * @category Handlers - */ -export const fetchConfigOperationHandler: OperationHandler = - { - handle: async ( - _operation: FetchConfigOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const { commitment } = scope; - scope.throwIfCanceled(); - - const config = await riskEngineConfigCache.get(convergence, commitment); - - return config; - }, - }; diff --git a/packages/js/src/plugins/riskEngineModule/operations/index.ts b/packages/js/src/plugins/riskEngineModule/operations/index.ts index 49b040072..c9f3f6dda 100644 --- a/packages/js/src/plugins/riskEngineModule/operations/index.ts +++ b/packages/js/src/plugins/riskEngineModule/operations/index.ts @@ -1,9 +1,3 @@ -export * from './initializeConfig'; -export * from './updateConfig'; -export * from './setInstrumentType'; export * from './calculateCollateralForConfirmation'; export * from './calculateCollateralForResponse'; export * from './calculateCollateralForRfq'; -export * from './setRiskCategoriesInfo'; -export * from './fetchConfig'; -export * from './closeConfig'; diff --git a/packages/js/src/plugins/riskEngineModule/operations/initializeConfig.ts b/packages/js/src/plugins/riskEngineModule/operations/initializeConfig.ts deleted file mode 100644 index 16a8e2cbc..000000000 --- a/packages/js/src/plugins/riskEngineModule/operations/initializeConfig.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { createInitializeConfigInstruction } from '@convergence-rfq/risk-engine'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { - DEFAULT_MINT_DECIMALS, - DEFAULT_COLLATERAL_FOR_FIXED_QUOTE_AMOUNT_RFQ, - DEFAULT_SAFETY_PRICE_SHIFT_FACTOR, - DEFAULT_OVERALL_SAFETY_FACTOR, - DEFAULT_MIN_COLLATERAL_REQUIREMENT, - DEFAULT_ACCEPTED_ORACLE_STALENESS, - DEFAULT_ACCEPTED_ORACLE_CONFIDENCE_INTERVAL_PORTION, -} from '../constants'; -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - Signer, -} from '../../../types'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; - -const Key = 'InitalizeConfigOperation' as const; - -/** - * Add an BaseAsset - * - * ```ts - * await convergence - * .riskEngine() - * .initializeConfig({ address }; - * ``` - * - * @group Operations - * @category Constructors - */ -export const initializeConfigOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type InitalizeConfigOperation = Operation< - typeof Key, - InitializeConfigInput, - InitializeConfigOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type InitializeConfigInput = - | { - /** The owner of the protocol. */ - authority?: Signer; - - /** The collateral amount required to create a variable size RFQ. */ - minCollateralRequirement?: number; - - /** The collateral amount required to create a fixed quote amount RFQ. */ - collateralForFixedQuoteAmountRfqCreation?: number; - - /** The number of decimals of the collateral mint. */ - collateralMintDecimals?: number; - - /** The safety price shift factor. */ - safetyPriceShiftFactor?: number; - - /** The overall safety factor. */ - overallSafetyFactor?: number; - - /** The accepted oracle staleness. */ - acceptedOracleStaleness?: number; - - /** The accepted oracle confidence interval portion. */ - acceptedOracleConfidenceIntervalPortion: number; - } - | undefined; - -/** - * @group Operations - * @category Outputs - */ -export type InitializeConfigOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const initializeConfigOperationHandler: OperationHandler = - { - handle: async ( - operation: InitalizeConfigOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - scope.throwIfCanceled(); - - const builder = initializeConfigBuilder( - convergence, - operation.input, - scope - ); - const { response } = await builder.sendAndConfirm( - convergence, - scope.confirmOptions - ); - - return { response }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type InitalizeConfigBuilderParams = InitializeConfigInput; - -/** - * Adds an BaseAsset - * - * ```ts - * const transactionBuilder = convergence - * .rfqs() - * .builders() - * .initializeConfig({ address }); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const initializeConfigBuilder = ( - convergence: Convergence, - params: InitalizeConfigBuilderParams, - options: TransactionBuilderOptions = {} -): TransactionBuilder => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { - authority = payer, - minCollateralRequirement = DEFAULT_MIN_COLLATERAL_REQUIREMENT, - collateralForFixedQuoteAmountRfqCreation = DEFAULT_COLLATERAL_FOR_FIXED_QUOTE_AMOUNT_RFQ, - collateralMintDecimals = DEFAULT_MINT_DECIMALS, - safetyPriceShiftFactor = DEFAULT_SAFETY_PRICE_SHIFT_FACTOR, - overallSafetyFactor = DEFAULT_OVERALL_SAFETY_FACTOR, - acceptedOracleStaleness = DEFAULT_ACCEPTED_ORACLE_STALENESS, - acceptedOracleConfidenceIntervalPortion = DEFAULT_ACCEPTED_ORACLE_CONFIDENCE_INTERVAL_PORTION, - } = params ?? {}; - - const riskEngineProgram = convergence.programs().getRiskEngine(programs); - const systemProgram = convergence.programs().getSystem(programs); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createInitializeConfigInstruction( - { - authority: authority.publicKey, - protocol: convergence.protocol().pdas().protocol(), - config: convergence.riskEngine().pdas().config(), - systemProgram: systemProgram.address, - }, - { - minCollateralRequirement, - collateralForFixedQuoteAmountRfqCreation, - collateralMintDecimals, - safetyPriceShiftFactor, - overallSafetyFactor, - acceptedOracleStaleness, - acceptedOracleConfidenceIntervalPortion, - }, - riskEngineProgram.address - ), - signers: [authority], - key: 'initializeConfig', - }); -}; diff --git a/packages/js/src/plugins/riskEngineModule/operations/setInstrumentType.ts b/packages/js/src/plugins/riskEngineModule/operations/setInstrumentType.ts deleted file mode 100644 index 369ec6c21..000000000 --- a/packages/js/src/plugins/riskEngineModule/operations/setInstrumentType.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { createSetInstrumentTypeInstruction } from '@convergence-rfq/risk-engine'; -import { PublicKey } from '@solana/web3.js'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { Config } from '../models'; -import { InstrumentType } from '../types'; -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - Signer, -} from '../../../types'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { riskEngineConfigCache } from '../cache'; - -const Key = 'SetInstrumentTypeOperation' as const; - -/** - * Set instrument type - * - * ```ts - * await convergence - * .riskEngine() - * .setInstrumentType({ ... }; - * ``` - * - * @group Operations - * @category Constructors - */ -export const setInstrumentTypeOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type SetInstrumentTypeOperation = Operation< - typeof Key, - SetInstrumentTypeInput, - SetInstrumentTypeOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type SetInstrumentTypeInput = { - /** - * The owner of the protocol. - */ - authority?: Signer; - - /** - * The instrument type. - */ - instrumentType: InstrumentType; - - /** - * The address of the instrument program account. - */ - instrumentProgram: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type SetInstrumentTypeOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; - - /** Risk engine config. */ - config: Config; -}; - -/** - * @group Operations - * @category Handlers - */ -export const setInstrumentTypeOperationHandler: OperationHandler = - { - handle: async ( - operation: SetInstrumentTypeOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const builder = setInstrumentTypeBuilder( - convergence, - operation.input, - scope - ); - - const { response } = await builder.sendAndConfirm( - convergence, - scope.confirmOptions - ); - - riskEngineConfigCache.clear(); - const config = await convergence.riskEngine().fetchConfig(scope); - - return { response, config }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type SetInstrumentTypeBuilderParams = SetInstrumentTypeInput; - -/** - * Adds an BaseAsset - * - * ```ts - * const transactionBuilder = convergence - * .riskEngine() - * .builders() - * .setInstrumentType({ instrumentType, instrumentProgram }); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const setInstrumentTypeBuilder = ( - convergence: Convergence, - params: SetInstrumentTypeBuilderParams, - options: TransactionBuilderOptions = {} -): TransactionBuilder => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { authority = payer, instrumentProgram, instrumentType } = params; - - const riskEngineProgram = convergence.programs().getRiskEngine(programs); - - const config = convergence.riskEngine().pdas().config(); - const protocol = convergence.protocol().pdas().protocol(); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createSetInstrumentTypeInstruction( - { - authority: authority.publicKey, - protocol, - config, - }, - { - instrumentProgram, - instrumentType, - }, - riskEngineProgram.address - ), - signers: [authority], - key: 'setInstrumentType', - }); -}; diff --git a/packages/js/src/plugins/riskEngineModule/operations/setRiskCategoriesInfo.ts b/packages/js/src/plugins/riskEngineModule/operations/setRiskCategoriesInfo.ts deleted file mode 100644 index b687d43f1..000000000 --- a/packages/js/src/plugins/riskEngineModule/operations/setRiskCategoriesInfo.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { createSetRiskCategoriesInfoInstruction } from '@convergence-rfq/risk-engine'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { - Config, - RiskCategoryChange, - toSolitaRiskCategoryChange, -} from '../models'; -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - Signer, -} from '../../../types'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { riskEngineConfigCache } from '../cache'; - -const Key = 'SetRiskCategoriesInfoOperation' as const; - -/** - * Set instrument type - * - * ```ts - * await convergence - * .riskEngine() - * .SetRiskCategoriesInfo({ ... }; - * ``` - * - * @group Operations - * @category Constructors - */ -export const setRiskCategoriesInfoOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type SetRiskCategoriesInfoOperation = Operation< - typeof Key, - SetRiskCategoriesInfoInput, - SetRiskCategoriesInfoOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type SetRiskCategoriesInfoInput = { - /** - * The owner of the protocol. - */ - authority?: Signer; - - /** The risk category changes. */ - changes: RiskCategoryChange[]; -}; - -/** - * @group Operations - * @category Outputs - */ -export type SetRiskCategoriesInfoOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; - - /** Risk engine config. */ - config: Config; -}; - -/** - * @group Operations - * @category Handlers - */ -export const setRiskCategoriesInfoOperationHandler: OperationHandler = - { - handle: async ( - operation: SetRiskCategoriesInfoOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const builder = setRiskCategoriesInfoBuilder( - convergence, - operation.input, - scope - ); - const { response } = await builder.sendAndConfirm( - convergence, - scope.confirmOptions - ); - - riskEngineConfigCache.clear(); - const config = await convergence.riskEngine().fetchConfig(scope); - - return { response, config }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type SetRiskCategoriesInfoBuilderParams = SetRiskCategoriesInfoInput; - -/** - * Adds an BaseAsset - * - * ```ts - * const transactionBuilder = convergence - * .riskEngine() - * .builders() - * .setRiskCategoriesInfo({ changes }); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const setRiskCategoriesInfoBuilder = ( - convergence: Convergence, - params: SetRiskCategoriesInfoBuilderParams, - options: TransactionBuilderOptions = {} -): TransactionBuilder => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { authority = payer, changes } = params; - - const riskEngineProgram = convergence.programs().getRiskEngine(programs); - - const config = convergence.riskEngine().pdas().config(); - const protocol = convergence.protocol().pdas().protocol(); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createSetRiskCategoriesInfoInstruction( - { - authority: authority.publicKey, - protocol, - config, - }, - { changes: changes.map(toSolitaRiskCategoryChange) }, - riskEngineProgram.address - ), - signers: [authority], - key: 'setRiskCategoriesInfo', - }); -}; diff --git a/packages/js/src/plugins/riskEngineModule/operations/updateConfig.ts b/packages/js/src/plugins/riskEngineModule/operations/updateConfig.ts deleted file mode 100644 index 9e0a7c00c..000000000 --- a/packages/js/src/plugins/riskEngineModule/operations/updateConfig.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { createUpdateConfigInstruction } from '@convergence-rfq/risk-engine'; - -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { Config } from '../models'; -import { - DEFAULT_MINT_DECIMALS, - DEFAULT_COLLATERAL_FOR_FIXED_QUOTE_AMOUNT_RFQ, - DEFAULT_SAFETY_PRICE_SHIFT_FACTOR, - DEFAULT_OVERALL_SAFETY_FACTOR, - DEFAULT_MIN_COLLATERAL_REQUIREMENT, - DEFAULT_ORACLE_STALENESS, - DEFAULT_ACCEPTED_ORACLE_CONFIDENCE_INTERVAL_POSITION, -} from '../constants'; -import { Convergence } from '../../../Convergence'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, - Signer, -} from '../../../types'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { riskEngineConfigCache } from '../cache'; - -const Key = 'UpdateConfigOperation' as const; - -/** - * Update risk engine config - * - * ```ts - * await convergence - * .riskEngine() - * .updateConfig({ ... }; - * ``` - * - * @group Operations - * @category Constructors - */ -export const updateConfigOperation = useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type UpdateConfigOperation = Operation< - typeof Key, - UpdateConfigInput, - UpdateConfigOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type UpdateConfigInput = - | { - /** The owner of the protocol. */ - authority?: Signer; - - /** The collateral amount required to create a variable size RFQ. */ - minCollateralRequirement?: number; - - /** The collateral amount required to create a fixed quote amount RFQ. */ - collateralForFixedQuoteAmountRfqCreation?: number; - - /** The number of decimals of the collateral mint. */ - collateralMintDecimals?: number; - - /** The safety price shift factor. */ - safetyPriceShiftFactor?: number; - - /** The overall safety factor. */ - overallSafetyFactor?: number; - - /** The accepted oracle staleness. */ - acceptedOracleStaleness?: number; - - /** The accepted oracle confidence interval portion. */ - acceptedOracleConfidenceIntervalPortion?: number; - } - | undefined; - -/** - * @group Operations - * @category Outputs - */ -export type UpdateConfigOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; - - /** Risk engine config model. */ - config: Config; -}; - -/** - * @group Operations - * @category Handlers - */ -export const updateConfigOperationHandler: OperationHandler = - { - handle: async ( - operation: UpdateConfigOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - scope.throwIfCanceled(); - - const builder = updateConfigBuilder(convergence, operation.input, scope); - const { response } = await builder.sendAndConfirm( - convergence, - scope.confirmOptions - ); - - riskEngineConfigCache.clear(); - const config = await convergence.riskEngine().fetchConfig(scope); - - return { response, config }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type UpdateConfigBuilderParams = UpdateConfigInput; - -/** - * Updates risk engine config - * - * ```ts - * const transactionBuilder = convergence - * .riskEngine() - * .builders() - * .updateConfig({ ... }); - * ``` - * - * @group Transaction Builders - * @category Constructors - */ -export const updateConfigBuilder = ( - convergence: Convergence, - params: UpdateConfigBuilderParams, - options: TransactionBuilderOptions = {} -): TransactionBuilder => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { - authority = payer, - minCollateralRequirement = DEFAULT_MIN_COLLATERAL_REQUIREMENT, - collateralForFixedQuoteAmountRfqCreation = DEFAULT_COLLATERAL_FOR_FIXED_QUOTE_AMOUNT_RFQ, - collateralMintDecimals = DEFAULT_MINT_DECIMALS, - safetyPriceShiftFactor = DEFAULT_SAFETY_PRICE_SHIFT_FACTOR, - overallSafetyFactor = DEFAULT_OVERALL_SAFETY_FACTOR, - acceptedOracleStaleness = DEFAULT_ORACLE_STALENESS, - acceptedOracleConfidenceIntervalPortion = DEFAULT_ACCEPTED_ORACLE_CONFIDENCE_INTERVAL_POSITION, - } = params ?? {}; - - const riskEngineProgram = convergence.programs().getRiskEngine(programs); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createUpdateConfigInstruction( - { - authority: authority.publicKey, - protocol: convergence.protocol().pdas().protocol(), - config: convergence.riskEngine().pdas().config(), - }, - { - minCollateralRequirement, - collateralForFixedQuoteAmountRfqCreation, - collateralMintDecimals, - safetyPriceShiftFactor, - overallSafetyFactor, - acceptedOracleStaleness, - acceptedOracleConfidenceIntervalPortion, - }, - riskEngineProgram.address - ), - signers: [authority], - key: 'updateConfig', - }); -}; diff --git a/packages/js/src/plugins/riskEngineModule/plugin.ts b/packages/js/src/plugins/riskEngineModule/plugin.ts index 70fdb977e..81a49dd28 100644 --- a/packages/js/src/plugins/riskEngineModule/plugin.ts +++ b/packages/js/src/plugins/riskEngineModule/plugin.ts @@ -5,24 +5,12 @@ import type { Convergence } from '../../Convergence'; import { ProgramClient } from '../programModule'; import { RiskEngineClient } from './RiskEngineClient'; import { - initializeConfigOperation, - initializeConfigOperationHandler, - updateConfigOperation, - updateConfigOperationHandler, - setInstrumentTypeOperation, - setInstrumentTypeOperationHandler, - setRiskCategoriesInfoOperation, - setRiskCategoriesInfoOperationHandler, calculateCollateralForConfirmationOperation, calculateCollateralForConfirmationOperationHandler, calculateCollateralForResponseOperation, calculateCollateralForResponseOperationHandler, calculateCollateralForRfqOperation, calculateCollateralForRfqOperationHandler, - fetchConfigOperation, - fetchConfigOperationHandler, - closeConfigOperation, - closeConfigOperationHandler, } from './operations'; /** @group Plugins */ @@ -42,13 +30,6 @@ export const riskEngineModule = (): ConvergencePlugin => ({ }; const op = convergence.operations(); - op.register(initializeConfigOperation, initializeConfigOperationHandler); - op.register(updateConfigOperation, updateConfigOperationHandler); - op.register(setInstrumentTypeOperation, setInstrumentTypeOperationHandler); - op.register( - setRiskCategoriesInfoOperation, - setRiskCategoriesInfoOperationHandler - ); op.register( calculateCollateralForRfqOperation, calculateCollateralForRfqOperationHandler @@ -61,8 +42,6 @@ export const riskEngineModule = (): ConvergencePlugin => ({ calculateCollateralForConfirmationOperation, calculateCollateralForConfirmationOperationHandler ); - op.register(fetchConfigOperation, fetchConfigOperationHandler); - op.register(closeConfigOperation, closeConfigOperationHandler); convergence.riskEngine = function () { return new RiskEngineClient(this); diff --git a/packages/js/src/plugins/riskEngineModule/types.ts b/packages/js/src/plugins/riskEngineModule/types.ts index 4d7470f91..918f772cb 100644 --- a/packages/js/src/plugins/riskEngineModule/types.ts +++ b/packages/js/src/plugins/riskEngineModule/types.ts @@ -1,7 +1 @@ export { RiskCategory as SolitaRiskCatgory } from '@convergence-rfq/rfq'; -export type { - Scenario, - RiskCategoryInfo, - InstrumentInfo, -} from '@convergence-rfq/risk-engine'; -export { InstrumentType } from '@convergence-rfq/risk-engine'; diff --git a/packages/js/src/plugins/rpcModule/RpcClient.ts b/packages/js/src/plugins/rpcModule/RpcClient.ts index 324a83eab..3cd8d955e 100644 --- a/packages/js/src/plugins/rpcModule/RpcClient.ts +++ b/packages/js/src/plugins/rpcModule/RpcClient.ts @@ -122,10 +122,6 @@ export class RpcClient { ): Promise { const { keypairs, identities } = getSignerHistogram(signers); - const { blockhash } = - await this.convergence.connection.getRecentBlockhash(); - transaction.recentBlockhash = blockhash; - // Keypair signers. if (keypairs.length > 0) { transaction.partialSign(...keypairs); @@ -236,6 +232,7 @@ export class RpcClient { } const rawTransaction = transaction.serialize(); + const signature = await this.sendRawTransaction( rawTransaction, confirmOptions, diff --git a/packages/js/src/plugins/spotInstrumentModule/accounts.ts b/packages/js/src/plugins/spotInstrumentModule/accounts.ts new file mode 100644 index 000000000..6f59e7521 --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/accounts.ts @@ -0,0 +1,18 @@ +import { Config } from '@convergence-rfq/spot-instrument'; + +import { + Account, + getAccountParsingAndAssertingFunction, + getAccountParsingFunction, +} from '../../types'; + +/** @group Accounts */ +export type SpotInstrumentConfigAccount = Account; + +/** @group Account Helpers */ +export const parseSpotInstrumentConfigAccount = + getAccountParsingFunction(Config); + +/** @group Account Helpers */ +export const toSpotInstrumentConfigAccount = + getAccountParsingAndAssertingFunction(Config); diff --git a/packages/js/src/plugins/spotInstrumentModule/client.ts b/packages/js/src/plugins/spotInstrumentModule/client.ts new file mode 100644 index 000000000..c7e9a278b --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/client.ts @@ -0,0 +1,49 @@ +import { + InitializeSpotInstrumentConfigInput, + InitializeSpotInstrumentConfigOutput, + initializeSpotInstrumentConfigOperation, + ModifySpotInstrumentConfigInput, + ModifySpotInstrumentConfigOutput, + modifySpotInstrumentConfigOperation, + FetchSpotInstrumentConfigInput, + FetchSpotInstrumentConfigOutput, + fetchSpotInstrumentConfigOperation, +} from './operations'; +import { SpotInstrumentPdasClient } from './pdas'; +import { OperationOptions } from '@/types'; +import { Convergence } from '@/Convergence'; + +export class SpotInstrumentClient { + constructor(protected readonly cvg: Convergence) {} + + pdas() { + return new SpotInstrumentPdasClient(this.cvg); + } + + fetchConfig( + input?: FetchSpotInstrumentConfigInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(fetchSpotInstrumentConfigOperation(input), options); + } + + initializeConfig( + input: InitializeSpotInstrumentConfigInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(initializeSpotInstrumentConfigOperation(input), options); + } + + modifyConfig( + input: ModifySpotInstrumentConfigInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(modifySpotInstrumentConfigOperation(input), options); + } +} diff --git a/packages/js/src/plugins/spotInstrumentModule/constants.ts b/packages/js/src/plugins/spotInstrumentModule/constants.ts new file mode 100644 index 000000000..5eb879215 --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/constants.ts @@ -0,0 +1 @@ +export const SPOT_QUOTE_FEE_BPS = 9; diff --git a/packages/js/src/plugins/spotInstrumentModule/index.ts b/packages/js/src/plugins/spotInstrumentModule/index.ts index f43b75927..dfc197785 100644 --- a/packages/js/src/plugins/spotInstrumentModule/index.ts +++ b/packages/js/src/plugins/spotInstrumentModule/index.ts @@ -2,3 +2,6 @@ export * from './programs'; export * from './instruments'; export * from './plugin'; export * from './types'; +export * from './pdas'; +export * from './models'; +export * from './operations'; diff --git a/packages/js/src/plugins/spotInstrumentModule/instruments.ts b/packages/js/src/plugins/spotInstrumentModule/instruments.ts index 11ac793a3..ba61f9b68 100644 --- a/packages/js/src/plugins/spotInstrumentModule/instruments.ts +++ b/packages/js/src/plugins/spotInstrumentModule/instruments.ts @@ -5,14 +5,17 @@ import { publicKey } from '@convergence-rfq/beet-solana'; import { Mint } from '../tokenModule'; import { - CreateOptionInstrumentsResult, LegInstrument, QuoteInstrument, + getInstrumentProgramIndex, + CreateOptionInstrumentsResult, } from '../instrumentModule'; import { Convergence } from '../../Convergence'; import { createSerializerFromFixableBeetArgsStruct } from '../../types'; import { removeDecimals } from '../../utils/conversions'; import { LegSide, fromSolitaLegSide } from '../rfqModule/models/LegSide'; +import { Protocol } from '../protocolModule'; +import { SPOT_INSTRUMENT_PROGRAM_ID } from './types'; type InstrumentData = { mintAddress: PublicKey; @@ -32,20 +35,27 @@ export const SpotInstrumentDataSerializer = * @group Models */ export class SpotLegInstrument implements LegInstrument { + legType: 'escrow'; + constructor( readonly convergence: Convergence, readonly mintAddress: PublicKey, readonly baseAssetIndex: BaseAssetIndex, + readonly instrumentIndex: number, readonly amount: number, readonly decimals: number, readonly side: LegSide - ) {} + ) { + this.legType = 'escrow'; + } + getInstrumentIndex = () => this.instrumentIndex; getProgramId = () => this.convergence.programs().getSpotInstrument().address; + getBaseAssetIndex = () => this.baseAssetIndex; + getAssetMint = () => this.mintAddress; getSide = () => this.side; getDecimals = () => this.decimals; getAmount = () => this.amount; - getBaseAssetIndex = () => this.baseAssetIndex; async getPreparationsBeforeRfqCreation(): Promise { return []; } @@ -57,7 +67,7 @@ export class SpotLegInstrument implements LegInstrument { side: LegSide = 'long' ): Promise { const mintInfoAddress = convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: mint.address }); const mintInfo = await convergence @@ -68,10 +78,16 @@ export class SpotLegInstrument implements LegInstrument { throw Error('Stablecoin mint cannot be used in a leg!'); } + const instrumentIndex = getInstrumentProgramIndex( + await convergence.protocol().get(), + SPOT_INSTRUMENT_PROGRAM_ID + ); + return new SpotLegInstrument( convergence, mint.address, mintInfo.mintType.baseAssetIndex, + instrumentIndex, amount, mint.decimals, side @@ -86,7 +102,7 @@ export class SpotLegInstrument implements LegInstrument { /** Helper method to get validation accounts for a spot instrument. */ getValidationAccounts() { const mintInfo = this.convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: this.mintAddress }); return [{ pubkey: mintInfo, isSigner: false, isWritable: false }]; @@ -99,24 +115,23 @@ export class SpotLegInstrument implements LegInstrument { } export const spotLegInstrumentParser = { - parseFromLeg(convergence: Convergence, leg: Leg): SpotLegInstrument { - const { - side, - instrumentAmount, - instrumentData, - baseAssetIndex, - instrumentDecimals, - } = leg; + parseFromLeg( + convergence: Convergence, + leg: Leg, + instrumentIndex: number + ): SpotLegInstrument { + const { side, amount, data, baseAssetIndex, amountDecimals } = leg; const { mintAddress } = SpotLegInstrument.deserializeInstrumentData( - Buffer.from(instrumentData) + Buffer.from(data) ); return new SpotLegInstrument( convergence, mintAddress, baseAssetIndex, - removeDecimals(instrumentAmount, instrumentDecimals), - instrumentDecimals, + instrumentIndex, + removeDecimals(amount, amountDecimals), + amountDecimals, fromSolitaLegSide(side) ); }, @@ -125,26 +140,36 @@ export const spotLegInstrumentParser = { export class SpotQuoteInstrument implements QuoteInstrument { protected constructor( readonly convergence: Convergence, + readonly instrumentIndex: number, readonly mintAddress: PublicKey, readonly decimals: number ) {} + getInstrumentIndex = () => this.instrumentIndex; + getAssetMint = () => this.mintAddress; getProgramId = () => this.convergence.programs().getSpotInstrument().address; getDecimals = () => this.decimals; - static async parseFromQuote( + static parseFromQuote( convergence: Convergence, + protocol: Protocol, quote: QuoteAsset - ): Promise { - const { instrumentData, instrumentDecimals } = quote; + ): QuoteInstrument { + const { data, decimals } = quote; const { mintAddress } = SpotLegInstrument.deserializeInstrumentData( - Buffer.from(instrumentData) + Buffer.from(data) + ); + + const instrumentIndex = getInstrumentProgramIndex( + protocol, + SPOT_INSTRUMENT_PROGRAM_ID ); return new SpotQuoteInstrument( convergence, + instrumentIndex, mintAddress, - instrumentDecimals + decimals ); } @@ -153,7 +178,7 @@ export class SpotQuoteInstrument implements QuoteInstrument { mint: Mint ): Promise { const mintInfoAddress = convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: mint.address }); const mintInfo = await convergence @@ -164,7 +189,17 @@ export class SpotQuoteInstrument implements QuoteInstrument { throw Error('Quote only supports stablecoin mints!'); } - return new SpotQuoteInstrument(convergence, mint.address, mint.decimals); + const instrumentIndex = getInstrumentProgramIndex( + await convergence.protocol().get(), + SPOT_INSTRUMENT_PROGRAM_ID + ); + + return new SpotQuoteInstrument( + convergence, + instrumentIndex, + mint.address, + mint.decimals + ); } static deserializeInstrumentData(buffer: Buffer): InstrumentData { @@ -175,7 +210,7 @@ export class SpotQuoteInstrument implements QuoteInstrument { /** Helper method to get validation accounts for a spot instrument. */ getValidationAccounts() { const mintInfo = this.convergence - .rfqs() + .protocol() .pdas() .mintInfo({ mint: this.mintAddress }); return [{ pubkey: mintInfo, isSigner: false, isWritable: false }]; diff --git a/packages/js/src/plugins/spotInstrumentModule/models/Config.ts b/packages/js/src/plugins/spotInstrumentModule/models/Config.ts new file mode 100644 index 000000000..04a1c0201 --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/models/Config.ts @@ -0,0 +1,19 @@ +import { PublicKey } from '@solana/web3.js'; +import { removeDecimals } from '../../../utils'; +import { SpotInstrumentConfigAccount } from '../accounts'; +import { SPOT_QUOTE_FEE_BPS } from '../constants'; + +export type SpotInstrumentConfig = { + readonly model: 'spotInstrumentConfig'; + readonly address: PublicKey; + readonly feeBps: number; +}; + +/** @group Model Helpers */ +export const toSpotInstrumentConfig = ( + account: SpotInstrumentConfigAccount +): SpotInstrumentConfig => ({ + model: 'spotInstrumentConfig', + address: account.publicKey, + feeBps: removeDecimals(account.data.feeBps, SPOT_QUOTE_FEE_BPS), +}); diff --git a/packages/js/src/plugins/spotInstrumentModule/models/index.ts b/packages/js/src/plugins/spotInstrumentModule/models/index.ts new file mode 100644 index 000000000..bd37f302d --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/models/index.ts @@ -0,0 +1 @@ +export * from './Config'; diff --git a/packages/js/src/plugins/spotInstrumentModule/operations/fetchConfig.ts b/packages/js/src/plugins/spotInstrumentModule/operations/fetchConfig.ts new file mode 100644 index 000000000..1935521af --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/operations/fetchConfig.ts @@ -0,0 +1,57 @@ +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { Convergence } from '../../../Convergence'; +import { SpotInstrumentConfig, toSpotInstrumentConfig } from '../models'; +import { toSpotInstrumentConfigAccount } from '../accounts'; + +const Key = 'FetchSpotInstrumentConfig' as const; + +export const fetchSpotInstrumentConfigOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type FetchSpotInstrumentConfigOperation = Operation< + typeof Key, + FetchSpotInstrumentConfigInput, + FetchSpotInstrumentConfigOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type FetchSpotInstrumentConfigInput = {} | undefined; + +/** + * @group Operations + * @category Outputs + */ +export type FetchSpotInstrumentConfigOutput = SpotInstrumentConfig; + +/** + * @group Operations + * @category Handlers + */ +export const fetchSpotInstrumentConfigOperationHandler: OperationHandler = + { + handle: async ( + _operation: FetchSpotInstrumentConfigOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const { commitment } = scope; + + const configAddress = cvg.spotInstrument().pdas().config(); + const account = await cvg.rpc().getAccount(configAddress, commitment); + const configAccount = toSpotInstrumentConfigAccount(account); + + return toSpotInstrumentConfig(configAccount); + }, + }; diff --git a/packages/js/src/plugins/spotInstrumentModule/operations/index.ts b/packages/js/src/plugins/spotInstrumentModule/operations/index.ts new file mode 100644 index 000000000..8197eae6e --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/operations/index.ts @@ -0,0 +1,3 @@ +export * from './initializeConfig'; +export * from './modifyConfig'; +export * from './fetchConfig'; diff --git a/packages/js/src/plugins/spotInstrumentModule/operations/initializeConfig.ts b/packages/js/src/plugins/spotInstrumentModule/operations/initializeConfig.ts new file mode 100644 index 000000000..b8d16d828 --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/operations/initializeConfig.ts @@ -0,0 +1,108 @@ +import { createInitializeConfigInstruction } from '@convergence-rfq/spot-instrument'; +import { SPOT_QUOTE_FEE_BPS } from '../constants'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + makeConfirmOptionsFinalizedOnMainnet, + useOperation, +} from '@/types'; +import { SendAndConfirmTransactionResponse } from '@/plugins'; +import { + TransactionBuilder, + TransactionBuilderOptions, + addDecimals, +} from '@/utils'; + +const Key = 'InitializeSpotInstrumentConfig' as const; + +export const initializeSpotInstrumentConfigOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type InitializeSpotInstrumentConfigOperation = Operation< + typeof Key, + InitializeSpotInstrumentConfigInput, + InitializeSpotInstrumentConfigOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type InitializeSpotInstrumentConfigInput = { + feeBps: number; +}; + +/** + * @group Operations + * @category Outputs + */ +export type InitializeSpotInstrumentConfigOutput = + SendAndConfirmTransactionResponse; + +/** + * @group Operations + * @category Handlers + */ +export const initializeSpotInstrumentConfigOperationHandler: OperationHandler = + { + handle: async ( + operation: InitializeSpotInstrumentConfigOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const builder = await initializeSpotInstrumentConfigBuilder( + cvg, + operation.input, + scope + ); + scope.throwIfCanceled(); + + const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( + cvg, + scope.confirmOptions + ); + const output = await builder.sendAndConfirm(cvg, confirmOptions); + scope.throwIfCanceled(); + return output.response; + }, + }; + +export const initializeSpotInstrumentConfigBuilder = async ( + cvg: Convergence, + params: InitializeSpotInstrumentConfigInput, + options: TransactionBuilderOptions = {} +): Promise> => { + const { feeBps } = params; + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + + const spotInstrumentProgram = cvg.programs().getSpotInstrument(); + const systemProgram = cvg.programs().getSystem(programs); + + const protocol = cvg.protocol().pdas().protocol(); + const config = cvg.spotInstrument().pdas().config(); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction: createInitializeConfigInstruction( + { + protocol, + authority: cvg.identity().publicKey, + config, + systemProgram: systemProgram.address, + }, + { + feeBps: addDecimals(feeBps, SPOT_QUOTE_FEE_BPS), + }, + spotInstrumentProgram.address + ), + signers: [payer], + key: 'initializeSpotInstrumentConfig', + }); +}; diff --git a/packages/js/src/plugins/spotInstrumentModule/operations/modifyConfig.ts b/packages/js/src/plugins/spotInstrumentModule/operations/modifyConfig.ts new file mode 100644 index 000000000..1a2c4f2c0 --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/operations/modifyConfig.ts @@ -0,0 +1,106 @@ +import { createModifyConfigInstruction } from '@convergence-rfq/spot-instrument'; +import { SPOT_QUOTE_FEE_BPS } from '../constants'; +import { Convergence } from '@/Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + makeConfirmOptionsFinalizedOnMainnet, + useOperation, +} from '@/types'; +import { SendAndConfirmTransactionResponse } from '@/plugins'; +import { + TransactionBuilder, + TransactionBuilderOptions, + addDecimals, +} from '@/utils'; + +const Key = 'ModifySpotInstrumentConfig' as const; + +export const modifySpotInstrumentConfigOperation = + useOperation(Key); + +/** + * @group Operations + * @category Types + */ +export type ModifySpotInstrumentConfigOperation = Operation< + typeof Key, + ModifySpotInstrumentConfigInput, + ModifySpotInstrumentConfigOutput +>; + +/** + * @group Operations + * @category Inputs + */ +export type ModifySpotInstrumentConfigInput = { + feeBps: number; +}; + +/** + * @group Operations + * @category Outputs + */ +export type ModifySpotInstrumentConfigOutput = + SendAndConfirmTransactionResponse; + +/** + * @group Operations + * @category Handlers + */ +export const modifySpotInstrumentConfigOperationHandler: OperationHandler = + { + handle: async ( + operation: ModifySpotInstrumentConfigOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const builder = await modifySpotInstrumentBuilder( + cvg, + operation.input, + scope + ); + scope.throwIfCanceled(); + + const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( + cvg, + scope.confirmOptions + ); + const output = await builder.sendAndConfirm(cvg, confirmOptions); + scope.throwIfCanceled(); + return output.response; + }, + }; + +export const modifySpotInstrumentBuilder = async ( + cvg: Convergence, + params: ModifySpotInstrumentConfigInput, + options: TransactionBuilderOptions = {} +): Promise> => { + const { feeBps } = params; + const { payer = cvg.rpc().getDefaultFeePayer() } = options; + + const spotProgram = cvg.programs().getSpotInstrument(); + + const protocol = cvg.protocol().pdas().protocol(); + const config = cvg.spotInstrument().pdas().config(); + + return TransactionBuilder.make<{}>() + .setFeePayer(payer) + .add({ + instruction: createModifyConfigInstruction( + { + protocol, + authority: cvg.identity().publicKey, + config, + }, + { + feeBps: addDecimals(feeBps, SPOT_QUOTE_FEE_BPS), + }, + spotProgram.address + ), + signers: [payer], + key: 'ModifySpotInstrumentConfig', + }); +}; diff --git a/packages/js/src/plugins/spotInstrumentModule/pdas.ts b/packages/js/src/plugins/spotInstrumentModule/pdas.ts new file mode 100644 index 000000000..d1e5e9a5d --- /dev/null +++ b/packages/js/src/plugins/spotInstrumentModule/pdas.ts @@ -0,0 +1,15 @@ +import { Convergence } from '@/Convergence'; +import { Pda, Program } from '@/types'; + +export class SpotInstrumentPdasClient { + constructor(protected readonly cvg: Convergence) {} + + config(): Pda { + const programId = this.programId(); + return Pda.find(programId, [Buffer.from('config', 'utf8')]); + } + + private programId(programs?: Program[]) { + return this.cvg.programs().getSpotInstrument(programs).address; + } +} diff --git a/packages/js/src/plugins/spotInstrumentModule/plugin.ts b/packages/js/src/plugins/spotInstrumentModule/plugin.ts index 966e86dae..64e5a3846 100644 --- a/packages/js/src/plugins/spotInstrumentModule/plugin.ts +++ b/packages/js/src/plugins/spotInstrumentModule/plugin.ts @@ -1,6 +1,15 @@ import { PROGRAM_ID } from '@convergence-rfq/spot-instrument'; import { ProgramClient } from '../programModule'; import { spotLegInstrumentParser } from './instruments'; +import { SpotInstrumentClient } from './client'; +import { + fetchSpotInstrumentConfigOperation, + fetchSpotInstrumentConfigOperationHandler, + initializeSpotInstrumentConfigOperation, + initializeSpotInstrumentConfigOperationHandler, + modifySpotInstrumentConfigOperation, + modifySpotInstrumentConfigOperationHandler, +} from './operations'; import { ConvergencePlugin, Program } from '@/types'; import type { Convergence } from '@/Convergence'; @@ -20,6 +29,24 @@ export const spotInstrumentModule = (): ConvergencePlugin => ({ return this.get(spotInstrumentProgram.name, programs); }; + convergence.spotInstrument = function () { + return new SpotInstrumentClient(this); + }; + + const op = convergence.operations(); + op.register( + fetchSpotInstrumentConfigOperation, + fetchSpotInstrumentConfigOperationHandler + ); + op.register( + initializeSpotInstrumentConfigOperation, + initializeSpotInstrumentConfigOperationHandler + ); + op.register( + modifySpotInstrumentConfigOperation, + modifySpotInstrumentConfigOperationHandler + ); + convergence.addLegInstrument( spotInstrumentProgram.address, spotLegInstrumentParser @@ -27,6 +54,12 @@ export const spotInstrumentModule = (): ConvergencePlugin => ({ }, }); +declare module '../../Convergence' { + interface Convergence { + spotInstrument(): SpotInstrumentClient; + } +} + declare module '../programModule/ProgramClient' { interface ProgramClient { getSpotInstrument(programs?: Program[]): Program; diff --git a/packages/js/src/plugins/spotInstrumentModule/types.ts b/packages/js/src/plugins/spotInstrumentModule/types.ts index d4665915a..156c3f736 100644 --- a/packages/js/src/plugins/spotInstrumentModule/types.ts +++ b/packages/js/src/plugins/spotInstrumentModule/types.ts @@ -1 +1 @@ -export { PROGRAM_ADDRESS as SPOT_INSTRUMENT_PROGRAM_ADDRESS } from '@convergence-rfq/spot-instrument'; \ No newline at end of file +export { PROGRAM_ID as SPOT_INSTRUMENT_PROGRAM_ID } from '@convergence-rfq/spot-instrument'; diff --git a/packages/js/src/plugins/systemModule/operations/createAccount.ts b/packages/js/src/plugins/systemModule/operations/createAccount.ts index 801ac7359..8b9d6d859 100644 --- a/packages/js/src/plugins/systemModule/operations/createAccount.ts +++ b/packages/js/src/plugins/systemModule/operations/createAccount.ts @@ -167,6 +167,7 @@ export const createAccountBuilder = async ( newAccount, lamports, }) + .addTxPriorityFeeIx(convergence) .add({ instruction: SystemProgram.createAccount({ fromPubkey: payer.publicKey, diff --git a/packages/js/src/plugins/systemModule/operations/transferSol.ts b/packages/js/src/plugins/systemModule/operations/transferSol.ts index 4fe12d890..93f2ab684 100644 --- a/packages/js/src/plugins/systemModule/operations/transferSol.ts +++ b/packages/js/src/plugins/systemModule/operations/transferSol.ts @@ -153,6 +153,7 @@ export const transferSolBuilder = ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: SystemProgram.transfer({ fromPubkey: from.publicKey, diff --git a/packages/js/src/plugins/tokenModule/operations/approveTokenDelegateAuthority.ts b/packages/js/src/plugins/tokenModule/operations/approveTokenDelegateAuthority.ts index 3387ccee9..96ce5e536 100644 --- a/packages/js/src/plugins/tokenModule/operations/approveTokenDelegateAuthority.ts +++ b/packages/js/src/plugins/tokenModule/operations/approveTokenDelegateAuthority.ts @@ -184,6 +184,7 @@ export const approveTokenDelegateAuthorityBuilder = ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createApproveInstruction( tokenAddressOrAta, diff --git a/packages/js/src/plugins/tokenModule/operations/createTokenWithMint.ts b/packages/js/src/plugins/tokenModule/operations/createTokenWithMint.ts index 954c31866..e7d4da5e2 100644 --- a/packages/js/src/plugins/tokenModule/operations/createTokenWithMint.ts +++ b/packages/js/src/plugins/tokenModule/operations/createTokenWithMint.ts @@ -276,6 +276,7 @@ export const createTokenWithMintBuilder = async ( const builder = TransactionBuilder.make() .setFeePayer(payer) .setContext({ mintSigner: mint, tokenAddress }) + .addTxPriorityFeeIx(convergence) // Create the Mint account. .add(createMintBuilder) diff --git a/packages/js/src/plugins/tokenModule/operations/freezeTokens.ts b/packages/js/src/plugins/tokenModule/operations/freezeTokens.ts index 409227e8b..a54470d2c 100644 --- a/packages/js/src/plugins/tokenModule/operations/freezeTokens.ts +++ b/packages/js/src/plugins/tokenModule/operations/freezeTokens.ts @@ -163,6 +163,7 @@ export const freezeTokensBuilder = ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createFreezeAccountInstruction( tokenAddressOrAta, diff --git a/packages/js/src/plugins/tokenModule/operations/mintTokens.ts b/packages/js/src/plugins/tokenModule/operations/mintTokens.ts index 8ed0f554c..0479fc293 100644 --- a/packages/js/src/plugins/tokenModule/operations/mintTokens.ts +++ b/packages/js/src/plugins/tokenModule/operations/mintTokens.ts @@ -233,7 +233,7 @@ export const mintTokensBuilder = async ( return ( TransactionBuilder.make() - + .addTxPriorityFeeIx(convergence) // Create token account if missing. .add( await convergence diff --git a/packages/js/src/plugins/tokenModule/operations/revokeTokenDelegateAuthority.ts b/packages/js/src/plugins/tokenModule/operations/revokeTokenDelegateAuthority.ts index 13c7a88e3..3b48bfc7f 100644 --- a/packages/js/src/plugins/tokenModule/operations/revokeTokenDelegateAuthority.ts +++ b/packages/js/src/plugins/tokenModule/operations/revokeTokenDelegateAuthority.ts @@ -162,6 +162,7 @@ export const revokeTokenDelegateAuthorityBuilder = ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createRevokeInstruction( tokenAccount, diff --git a/packages/js/src/plugins/tokenModule/operations/sendTokens.ts b/packages/js/src/plugins/tokenModule/operations/sendTokens.ts index a7275461b..9a3c23663 100644 --- a/packages/js/src/plugins/tokenModule/operations/sendTokens.ts +++ b/packages/js/src/plugins/tokenModule/operations/sendTokens.ts @@ -260,7 +260,7 @@ export const sendTokensBuilder = async ( return ( TransactionBuilder.make() .setFeePayer(payer) - + .addTxPriorityFeeIx(convergence) // Create token account if missing. .add( await convergence diff --git a/packages/js/src/plugins/tokenModule/operations/thawTokens.ts b/packages/js/src/plugins/tokenModule/operations/thawTokens.ts index 3a27b5310..8eebd8d22 100644 --- a/packages/js/src/plugins/tokenModule/operations/thawTokens.ts +++ b/packages/js/src/plugins/tokenModule/operations/thawTokens.ts @@ -163,6 +163,7 @@ export const thawTokensBuilder = ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createThawAccountInstruction( tokenAddressOrAta, diff --git a/packages/js/src/plugins/vaultOperatorModule/accounts.ts b/packages/js/src/plugins/vaultOperatorModule/accounts.ts new file mode 100644 index 000000000..77e7b4ae3 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/accounts.ts @@ -0,0 +1,17 @@ +import { VaultParams } from '@convergence-rfq/vault-operator'; + +import { + Account, + getAccountParsingAndAssertingFunction, + getAccountParsingFunction, +} from '../../types'; + +/** @group Accounts */ +export type VaultParamsAccount = Account; + +/** @group Account Helpers */ +export const parseVaultParamsAccount = getAccountParsingFunction(VaultParams); + +/** @group Account Helpers */ +export const toVaultParamsAccount = + getAccountParsingAndAssertingFunction(VaultParams); diff --git a/packages/js/src/plugins/vaultOperatorModule/client.ts b/packages/js/src/plugins/vaultOperatorModule/client.ts new file mode 100644 index 000000000..48e95ad33 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/client.ts @@ -0,0 +1,69 @@ +import type { Convergence } from '../../Convergence'; +import { + CreateVaultInput, + CreateVaultOutput, + createVaultOperation, + FindVaultByAddressInput, + FindVaultByAddressOutput, + findVaultByAddressOperation, + FindVaultsInput, + FindVaultsOutput, + findVaultsOperation, + ConfirmAndPrepareVaultInput, + ConfirmAndPrepareVaultOutput, + confirmAndPrepareVaultOperation, + WithdrawVaultTokensInput, + WithdrawVaultTokensOutput, + withdrawVaultTokensOperation, +} from './operations'; +import { VaultOperatorPdasClient } from './pdas'; +import { OperationOptions } from '@/types'; + +export class VaultOperatorClient { + constructor(protected readonly cvg: Convergence) {} + + pdas() { + return new VaultOperatorPdasClient(this.cvg); + } + + create( + input: CreateVaultInput, + options?: OperationOptions + ): Promise { + return this.cvg.operations().execute(createVaultOperation(input), options); + } + + findByAddress( + input: FindVaultByAddressInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(findVaultByAddressOperation(input), options); + } + + find( + input: FindVaultsInput = {}, + options?: OperationOptions + ): Promise { + return this.cvg.operations().execute(findVaultsOperation(input), options); + } + + confirmAndPrepare( + input: ConfirmAndPrepareVaultInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(confirmAndPrepareVaultOperation(input), options); + } + + withdrawTokens( + input: WithdrawVaultTokensInput, + options?: OperationOptions + ): Promise { + return this.cvg + .operations() + .execute(withdrawVaultTokensOperation(input), options); + } +} diff --git a/packages/js/src/plugins/vaultOperatorModule/gpa.ts b/packages/js/src/plugins/vaultOperatorModule/gpa.ts new file mode 100644 index 000000000..40afe3970 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/gpa.ts @@ -0,0 +1,30 @@ +import { PublicKey } from '@solana/web3.js'; +import { + // OrderType, + PROGRAM_ID, + vaultParamsDiscriminator, + // StoredRfqState, +} from '@convergence-rfq/vault-operator'; + +import { Convergence } from '../../Convergence'; +import { GpaBuilder } from '../../utils'; + +const CREATOR = 8; +const RFQ = CREATOR + 32; +const ACTIVE_WINDOW_EXPIRATION = RFQ + 32; +const TOKENS_WITHDRAWN = ACTIVE_WINDOW_EXPIRATION + 8; + +export class VaultGpaBuilder extends GpaBuilder { + constructor(convergence: Convergence, programId?: PublicKey) { + super(convergence, programId ?? PROGRAM_ID); + this.where(0, Buffer.from(vaultParamsDiscriminator)); + } + + whereCreator(creator: PublicKey) { + return this.where(CREATOR, creator); + } + + whereTokensWithdrawn(tokensWithdrawn: boolean) { + return this.where(TOKENS_WITHDRAWN, tokensWithdrawn ? 1 : 0); + } +} diff --git a/packages/js/src/plugins/vaultOperatorModule/index.ts b/packages/js/src/plugins/vaultOperatorModule/index.ts new file mode 100644 index 000000000..d8cd806d1 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/index.ts @@ -0,0 +1,3 @@ +export * from './plugin'; +export * from './models'; +export * from './operations'; diff --git a/packages/js/src/plugins/vaultOperatorModule/models/VaultParams.ts b/packages/js/src/plugins/vaultOperatorModule/models/VaultParams.ts new file mode 100644 index 000000000..ed2a25a02 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/models/VaultParams.ts @@ -0,0 +1,47 @@ +import { PublicKey } from '@solana/web3.js'; + +import { VaultParamsAccount } from '../accounts'; +import { removeDecimals } from '@/utils'; +import { ABSOLUTE_PRICE_DECIMALS, Rfq } from '@/plugins/rfqModule'; + +export type VaultParameters = { + /** A model identifier to distinguish models in the SDK. */ + readonly model: 'vaultParameters'; + + readonly address: PublicKey; + + readonly creator: PublicKey; + + readonly rfq: PublicKey; + + readonly tokensWithdrawn: boolean; + + readonly acceptablePriceLimit: number; + + readonly confirmedResponse: PublicKey; +}; + +/** @group Model Helpers */ +export const toVaultParams = ( + account: VaultParamsAccount, + rfq: Rfq +): VaultParameters => { + const acceptablePriceLimitTemp = removeDecimals( + account.data.acceptablePriceLimit, + rfq.quoteAsset.getDecimals() + ); + const acceptablePriceLimit = removeDecimals( + acceptablePriceLimitTemp, + ABSOLUTE_PRICE_DECIMALS + ); + + return { + model: 'vaultParameters', + address: account.publicKey, + creator: account.data.creator, + rfq: account.data.rfq, + tokensWithdrawn: account.data.tokensWithdrawn, + acceptablePriceLimit, + confirmedResponse: account.data.confirmedResponse, + }; +}; diff --git a/packages/js/src/plugins/vaultOperatorModule/models/index.ts b/packages/js/src/plugins/vaultOperatorModule/models/index.ts new file mode 100644 index 000000000..860362857 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/models/index.ts @@ -0,0 +1 @@ +export * from './VaultParams'; diff --git a/packages/js/src/plugins/vaultOperatorModule/operations/confirmAndPrepareVault.ts b/packages/js/src/plugins/vaultOperatorModule/operations/confirmAndPrepareVault.ts new file mode 100644 index 000000000..a7b2e15a5 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/operations/confirmAndPrepareVault.ts @@ -0,0 +1,168 @@ +import { + createConfirmResponseInstruction, + createPrepareSettlementInstruction, +} from '@convergence-rfq/vault-operator'; +import { PublicKey } from '@solana/web3.js'; +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; + +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { VaultParameters } from '../models'; +import { + EscrowResponse, + EscrowRfq, + getEscrowPrepareSettlementRemainingAccounts, +} from '@/plugins/rfqModule'; + +const Key = 'ConfirmAndPrepareVaultOperation' as const; + +export const confirmAndPrepareVaultOperation = + useOperation(Key); + +export type ConfirmAndPrepareVaultOperation = Operation< + typeof Key, + ConfirmAndPrepareVaultInput, + ConfirmAndPrepareVaultOutput +>; + +export type ConfirmAndPrepareVaultInput = { + vault: VaultParameters; + rfq: EscrowRfq; + response: EscrowResponse; +}; + +export type ConfirmAndPrepareVaultOutput = { + response: SendAndConfirmTransactionResponse; + vault: VaultParameters; +}; + +export const confirmAndPrepareVaultOperationHandler: OperationHandler = + { + handle: async ( + operation: ConfirmAndPrepareVaultOperation, + cvg: Convergence, + scope: OperationScope + ) => { + const { builder, vault } = await confirmAndPrepareVaultBuilder( + cvg, + operation.input, + scope + ); + + const output = await builder.sendAndConfirm(cvg, scope.confirmOptions); + + scope.throwIfCanceled(); + + return { ...output, vault }; + }, + }; + +export type ConfirmAndPrepareVaultBuilderParams = ConfirmAndPrepareVaultInput; + +export type ConfirmAndPrepareVaultResult = { + builder: TransactionBuilder; + vault: VaultParameters; +}; + +export const confirmAndPrepareVaultBuilder = async ( + cvg: Convergence, + params: ConfirmAndPrepareVaultBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { vault, rfq, response } = params; + + if (!vault.rfq.equals(rfq.address)) { + throw new Error('RFQ does not match the provided vault'); + } + if (!response.rfq.equals(rfq.address)) { + throw new Error('RFQ does not match the provided response'); + } + if (!vault.confirmedResponse.equals(PublicKey.default)) { + throw new Error('Another response is already confirmed for this vault'); + } + + const vaultProgram = cvg.programs().getVaultOperator(programs).address; + const operator = cvg.vaultOperator().pdas().operator(vault.address); + + const confirmIx = { + instruction: createConfirmResponseInstruction( + { + vaultParams: vault.address, + operator, + protocol: cvg.protocol().pdas().protocol(), + rfq: rfq.address, + response: response.address, + collateralInfo: cvg.collateral().pdas().collateralInfo({ + user: operator, + }), + makerCollateralInfo: cvg.collateral().pdas().collateralInfo({ + user: response.maker, + }), + collateralToken: cvg.collateral().pdas().collateralToken({ + user: operator, + }), + riskEngine: cvg.programs().getRiskEngine(programs).address, + rfqProgram: cvg.programs().getRfq(programs).address, + }, + vaultProgram + ), + signers: [], + key: 'confirmVault', + }; + + const { + anchorRemainingAccounts: prepareRemainingAccounts, + ataTxBuilderArray, + } = await getEscrowPrepareSettlementRemainingAccounts( + cvg, + operator, + rfq, + response, + 1 + ); + if (ataTxBuilderArray.length > 0) { + throw new Error( + 'Vault ata accounts for the settlement should be pre-created!' + ); + } + + const prepareIx = { + instruction: createPrepareSettlementInstruction( + { + vaultParams: vault.address, + operator, + protocol: cvg.protocol().pdas().protocol(), + rfq: rfq.address, + response: response.address, + rfqProgram: cvg.programs().getRfq(programs).address, + anchorRemainingAccounts: prepareRemainingAccounts, + }, + vaultProgram + ), + signers: [], + key: 'prepareVaultSettlement', + }; + + const builder = TransactionBuilder.make() + .setFeePayer(payer) + .addTxPriorityFeeIx(cvg) + .add(confirmIx, prepareIx); + + return { + builder, + vault: { + ...vault, + confirmedResponse: response.address, + }, + }; +}; diff --git a/packages/js/src/plugins/vaultOperatorModule/operations/createVault.ts b/packages/js/src/plugins/vaultOperatorModule/operations/createVault.ts new file mode 100644 index 000000000..c9b1d0487 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/operations/createVault.ts @@ -0,0 +1,283 @@ +import { createCreateRfqInstruction } from '@convergence-rfq/vault-operator'; +import { Keypair, PublicKey, SystemProgram } from '@solana/web3.js'; +import BN from 'bn.js'; +import * as multisig from '@sqds/multisig'; +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; + +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + Signer, + useOperation, +} from '../../../types'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { + SpotLegInstrument, + SpotQuoteInstrument, + spotInstrumentProgram, +} from '@/plugins/spotInstrumentModule'; +import { + instrumentToQuote, + instrumentToSolitaLeg, + serializeInstrumentAsSolitaLeg, +} from '@/plugins/instrumentModule'; +import { + ABSOLUTE_PRICE_DECIMALS, + LEG_MULTIPLIER_DECIMALS, + calculateExpectedLegsHash, + instrumentsToLegAccounts, + legsToBaseAssetAccounts, + toSolitaOrderType, +} from '@/plugins/rfqModule'; +import { addDecimals, getOrCreateATAtxBuilder } from '@/utils'; +import { Mint } from '@/plugins/tokenModule'; + +const Key = 'CreateVaultOperation' as const; + +export const createVaultOperation = useOperation(Key); + +export type CreateVaultOperation = Operation< + typeof Key, + CreateVaultInput, + CreateVaultOutput +>; + +export type VaultRfqOrderDetails = + | { type: 'buy'; quoteAmount: number } + | { type: 'sell'; legAmount: number }; + +export type CreateVaultInput = { + acceptablePriceLimit: number; + legMint: Mint; + quoteMint: Mint; + orderDetails: VaultRfqOrderDetails; + activeWindow: number; + settlingWindow: number; +}; + +export type CreateVaultOutput = { + vaultAddress: PublicKey; + rfqAddress: PublicKey; + response: SendAndConfirmTransactionResponse; +}; + +export const createVaultOperationHandler: OperationHandler = + { + handle: async ( + operation: CreateVaultOperation, + cvg: Convergence, + scope: OperationScope + ) => { + const { builder, ataBuilder, vaultAddress, rfqAddress } = + await createVaultBuilder(cvg, operation.input, scope); + builder.prepend(ataBuilder); + + const output = await builder.sendAndConfirm(cvg, scope.confirmOptions); + + scope.throwIfCanceled(); + + return { ...output, vaultAddress, rfqAddress }; + }, + }; + +export type CreateVaultBuilderParams = CreateVaultInput & { + squads?: { vaultPda: PublicKey; transactionPda: PublicKey }; +}; + +export type CreateVaultBuilderResult = { + builder: TransactionBuilder; + ataBuilder: TransactionBuilder; + vaultAddress: PublicKey; + rfqAddress: PublicKey; +}; + +export const createVaultBuilder = async ( + cvg: Convergence, + params: CreateVaultBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { + acceptablePriceLimit, + legMint, + quoteMint, + orderDetails, + activeWindow, + settlingWindow, + squads, + } = params; + + const leg = await SpotLegInstrument.create(cvg, legMint, 1, 'long'); + const quote = await SpotQuoteInstrument.create(cvg, quoteMint); + + const creator = cvg.identity(); + + let signers: Signer[]; + let vaultParamsKey: PublicKey; + let executorKey: PublicKey; + if (squads === undefined) { + const vaultParamsSigner = Keypair.generate(); + signers = [creator, vaultParamsSigner]; + vaultParamsKey = vaultParamsSigner.publicKey; + executorKey = creator.publicKey; + } else { + signers = []; + vaultParamsKey = multisig.getEphemeralSignerPda({ + ephemeralSignerIndex: 0, + transactionPda: squads.transactionPda, + })[0]; + executorKey = squads.vaultPda; + } + + const vaultProgram = cvg.programs().getVaultOperator(programs).address; + const operator = cvg.vaultOperator().pdas().operator(vaultParamsKey); + const protocol = await cvg.protocol().get(); + + const sendMint = + orderDetails.type === 'buy' ? quote.getAssetMint() : leg.getAssetMint(); + const receiveMint = + orderDetails.type === 'buy' ? leg.getAssetMint() : quote.getAssetMint(); + + const solitaLeg = instrumentToSolitaLeg(leg); + const serializedLeg = serializeInstrumentAsSolitaLeg(leg); + const expectedLegsHash = calculateExpectedLegsHash([serializedLeg]); + const recentTimestamp = new BN(Math.floor(Date.now() / 1_000)); + const fixedSize = + orderDetails.type === 'buy' + ? { type: 'fixed-quote' as const, amount: orderDetails.quoteAmount } + : { type: 'fixed-base' as const, amount: orderDetails.legAmount }; + + const { ataPubKey: vaultTokens, txBuilder: vaultAtaBuilder } = + await getOrCreateATAtxBuilder(cvg, sendMint, operator, programs); + const { txBuilder: receivedAtaBuilder } = await getOrCreateATAtxBuilder( + cvg, + receiveMint, + operator, + programs + ); + const executorTokens = cvg.tokens().pdas().associatedTokenAccount({ + mint: sendMint, + owner: executorKey, + programs, + }); + + const rfqPda = cvg + .rfqs() + .pdas() + .rfq({ + taker: operator, + legsHash: Buffer.from(expectedLegsHash), + printTradeProvider: null, + orderType: orderDetails.type, + quoteAsset: instrumentToQuote(quote), + fixedSize, + activeWindow, + settlingWindow, + recentTimestamp, + }); + + const quoteAccounts = [ + { + pubkey: spotInstrumentProgram.address, + isSigner: false, + isWritable: false, + }, + { + pubkey: cvg + .rfqs() + .pdas() + .quote({ quoteAsset: instrumentToQuote(quote) }), + isSigner: false, + isWritable: false, + }, + ]; + const baseAssetAccounts = legsToBaseAssetAccounts(cvg, [solitaLeg]); + const legAccounts = await instrumentsToLegAccounts([leg]); + const createRfqAccounts = [ + ...quoteAccounts, + ...baseAssetAccounts, + ...legAccounts, + ]; + + const lamportsForOperator = 14288880; + const transferLamportIx = { + instruction: SystemProgram.transfer({ + fromPubkey: executorKey, + toPubkey: operator, + lamports: lamportsForOperator, + }), + signers: [], + key: 'sendLamportsToOperator', + }; + const acceptablePriceLimitWithDecimals = addDecimals( + acceptablePriceLimit, + quote.decimals + ).mul(new BN(10).pow(new BN(ABSOLUTE_PRICE_DECIMALS))); + + const size = + fixedSize.type === 'fixed-base' + ? addDecimals(fixedSize.amount, LEG_MULTIPLIER_DECIMALS) + : addDecimals(fixedSize.amount, quote.decimals); + + const builder = TransactionBuilder.make() + .setFeePayer(payer) + .addTxPriorityFeeIx(cvg) + .add(transferLamportIx, { + instruction: createCreateRfqInstruction( + { + creator: executorKey, + vaultParams: vaultParamsKey, + operator, + sendMint, + receiveMint, + vault: vaultTokens, + vaultTokensSource: executorTokens, + protocol: cvg.protocol().pdas().protocol(), + rfq: rfqPda, + whitelist: vaultProgram, + collateralInfo: cvg.collateral().pdas().collateralInfo({ + user: operator, + }), + collateralToken: cvg.collateral().pdas().collateralToken({ + user: operator, + }), + collateralMint: protocol.collateralMint, + riskEngine: cvg.programs().getRiskEngine().address, + rfqProgram: cvg.programs().getRfq().address, + anchorRemainingAccounts: createRfqAccounts, + }, + { + acceptablePriceLimit: acceptablePriceLimitWithDecimals, + legBaseAssetIndex: leg.getBaseAssetIndex().value, + orderType: toSolitaOrderType(orderDetails.type), + size, + activeWindow, + settlingWindow, + recentTimestamp, + }, + vaultProgram + ), + signers, + key: 'createVault', + }); + + const ataBuilder = TransactionBuilder.make().setFeePayer(payer); + if (vaultAtaBuilder !== undefined) { + ataBuilder.add(vaultAtaBuilder); + } + if (receivedAtaBuilder !== undefined) { + ataBuilder.add(receivedAtaBuilder); + } + + return { + builder, + ataBuilder, + vaultAddress: vaultParamsKey, + rfqAddress: rfqPda, + }; +}; diff --git a/packages/js/src/plugins/vaultOperatorModule/operations/findVaultByAddress.ts b/packages/js/src/plugins/vaultOperatorModule/operations/findVaultByAddress.ts new file mode 100644 index 000000000..5956a5803 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/operations/findVaultByAddress.ts @@ -0,0 +1,67 @@ +import { PublicKey } from '@solana/web3.js'; + +import { VaultParameters, toVaultParams } from '../models'; +import { toVaultParamsAccount } from '../accounts'; + +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { Convergence } from '../../../Convergence'; +import { EscrowRfq } from '@/plugins/rfqModule'; + +const Key = 'FindVaultByAddressOperation' as const; + +export const findVaultByAddressOperation = + useOperation(Key); + +export type FindVaultByAddressOperation = Operation< + typeof Key, + FindVaultByAddressInput, + FindVaultByAddressOutput +>; + +export type FindVaultByAddressInput = { + /** The address of the Vault. */ + address: PublicKey; +}; + +export type FindVaultByAddressOutput = { + vault: VaultParameters; + rfq: EscrowRfq; +}; + +/** + * @group Operations + * @category Handlers + */ +export const findVaultByAddressOperationHandler: OperationHandler = + { + handle: async ( + operation: FindVaultByAddressOperation, + cvg: Convergence, + scope: OperationScope + ): Promise => { + const { commitment } = scope; + const { address } = operation.input; + scope.throwIfCanceled(); + + const account = await cvg.rpc().getAccount(address, commitment); + const solitaAccount = toVaultParamsAccount(account); + const rfq = await cvg + .rfqs() + .findRfqByAddress({ address: solitaAccount.data.rfq }); + if (rfq.model !== 'escrowRfq') { + throw new Error('Unexpected rfq type'); + } + const vault = toVaultParams(solitaAccount, rfq); + scope.throwIfCanceled(); + + return { + vault, + rfq, + }; + }, + }; diff --git a/packages/js/src/plugins/vaultOperatorModule/operations/findVaults.ts b/packages/js/src/plugins/vaultOperatorModule/operations/findVaults.ts new file mode 100644 index 000000000..1df406dee --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/operations/findVaults.ts @@ -0,0 +1,101 @@ +import { PublicKey } from '@solana/web3.js'; + +import { VaultParameters, toVaultParams } from '../models'; +import { toVaultParamsAccount } from '../accounts'; + +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { Convergence } from '../../../Convergence'; +import { VaultGpaBuilder } from '../gpa'; +import { EscrowRfq, toRfq, toRfqAccount } from '@/plugins/rfqModule'; + +const Key = 'FindVaultsOperation' as const; + +export const findVaultsOperation = useOperation(Key); + +export type FindVaultsOperation = Operation< + typeof Key, + FindVaultsInput, + FindVaultsOutput +>; + +export type FindVaultsInput = { + creator?: PublicKey; + // Defaults to 100 + chunkSize?: number; +}; + +export type FindVaultsOutput = { + vault: VaultParameters; + rfq: EscrowRfq; +}[]; + +/** + * @group Operations + * @category Handlers + */ +export const findVaultsOperationHandler: OperationHandler = + { + async handle( + operation: FindVaultsOperation, + cvg: Convergence, + scope: OperationScope + ) { + const { commitment } = scope; + const { creator, chunkSize = 100 } = operation.input; + + scope.throwIfCanceled(); + + const rfqGpaBuilder = new VaultGpaBuilder(cvg) + .whereTokensWithdrawn(false) + .withoutData(); + if (creator !== undefined) { + rfqGpaBuilder.whereCreator(creator); + } + + const unparsedAccounts = await rfqGpaBuilder.get(); + const unparsedAddresses = unparsedAccounts.map( + (account) => account.publicKey + ); + + const result = []; + + for (let i = 0; i < unparsedAddresses.length; i += chunkSize) { + const chunk = unparsedAddresses.slice(i, i + chunkSize); + + const vaultRawAccounts = await cvg + .rpc() + .getMultipleAccounts(chunk, commitment); + const vaultSolitaAccounts = await Promise.all( + vaultRawAccounts.map((account) => toVaultParamsAccount(account)) + ); + const rfqAddresses = vaultSolitaAccounts.map( + (account) => account.data.rfq + ); + const rfqRawAccounts = await cvg + .rpc() + .getMultipleAccounts(rfqAddresses, commitment); + const rfqs = await Promise.all( + rfqRawAccounts.map((account) => toRfq(cvg, toRfqAccount(account))) + ); + + const vaultRfqPairs = vaultSolitaAccounts.map((solVault, index) => { + const rfq = rfqs[index]; + if (rfq.model !== 'escrowRfq') { + throw new Error('Unexpected rfq type'); + } + + const vault = toVaultParams(solVault, rfq); + return { vault, rfq }; + }); + + result.push(...vaultRfqPairs); + } + + return result; + }, + }; diff --git a/packages/js/src/plugins/vaultOperatorModule/operations/index.ts b/packages/js/src/plugins/vaultOperatorModule/operations/index.ts new file mode 100644 index 000000000..94c4cda51 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/operations/index.ts @@ -0,0 +1,5 @@ +export * from './createVault'; +export * from './findVaultByAddress'; +export * from './findVaults'; +export * from './confirmAndPrepareVault'; +export * from './withdrawVaultTokens'; diff --git a/packages/js/src/plugins/vaultOperatorModule/operations/withdrawVaultTokens.ts b/packages/js/src/plugins/vaultOperatorModule/operations/withdrawVaultTokens.ts new file mode 100644 index 000000000..8de3f4235 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/operations/withdrawVaultTokens.ts @@ -0,0 +1,115 @@ +import { createWithdrawTokensInstruction } from '@convergence-rfq/vault-operator'; +import { SendAndConfirmTransactionResponse } from '../../rpcModule'; + +import { Convergence } from '../../../Convergence'; +import { + Operation, + OperationHandler, + OperationScope, + useOperation, +} from '../../../types'; +import { + TransactionBuilder, + TransactionBuilderOptions, +} from '../../../utils/TransactionBuilder'; +import { VaultParameters } from '../models'; +import { EscrowRfq } from '@/plugins/rfqModule'; + +const Key = 'WithdrawVaultTokensOperation' as const; + +export const withdrawVaultTokensOperation = + useOperation(Key); + +export type WithdrawVaultTokensOperation = Operation< + typeof Key, + WithdrawVaultTokensInput, + WithdrawVaultTokensOutput +>; + +export type WithdrawVaultTokensInput = { + vault: VaultParameters; + rfq: EscrowRfq; +}; + +export type WithdrawVaultTokensOutput = { + response: SendAndConfirmTransactionResponse; +}; + +export const withdrawVaultTokensOperationHandler: OperationHandler = + { + handle: async ( + operation: WithdrawVaultTokensOperation, + cvg: Convergence, + scope: OperationScope + ) => { + const builder = await withdrawVaultTokensBuilder( + cvg, + operation.input, + scope + ); + + const output = await builder.sendAndConfirm(cvg, scope.confirmOptions); + + scope.throwIfCanceled(); + + return output; + }, + }; + +export type WithdrawVaultTokensBuilderParams = WithdrawVaultTokensInput; + +export const withdrawVaultTokensBuilder = async ( + cvg: Convergence, + params: WithdrawVaultTokensBuilderParams, + options: TransactionBuilderOptions = {} +): Promise => { + const { programs, payer = cvg.rpc().getDefaultFeePayer() } = options; + const { vault, rfq } = params; + + if (!vault.rfq.equals(rfq.address)) { + throw new Error('RFQ does not match the provided vault'); + } + + const vaultProgram = cvg.programs().getVaultOperator(programs).address; + const operator = cvg.vaultOperator().pdas().operator(vault.address); + + const legMint = rfq.legs[0].getAssetMint(); + const { quoteMint } = rfq; + + const ix = { + instruction: createWithdrawTokensInstruction( + { + creator: vault.creator, + vaultParams: vault.address, + operator, + legVault: cvg + .tokens() + .pdas() + .associatedTokenAccount({ mint: legMint, owner: operator }), + legTokens: cvg + .tokens() + .pdas() + .associatedTokenAccount({ mint: legMint, owner: vault.creator }), + legMint, + quoteVault: cvg + .tokens() + .pdas() + .associatedTokenAccount({ mint: quoteMint, owner: operator }), + quoteTokens: cvg + .tokens() + .pdas() + .associatedTokenAccount({ mint: quoteMint, owner: vault.creator }), + quoteMint, + response: vault.confirmedResponse, + }, + vaultProgram + ), + signers: [], + key: 'withdrawVaultTokens', + }; + + return TransactionBuilder.make() + .setFeePayer(payer) + .addTxPriorityFeeIx(cvg) + .add(ix); +}; diff --git a/packages/js/src/plugins/vaultOperatorModule/pdas.ts b/packages/js/src/plugins/vaultOperatorModule/pdas.ts new file mode 100644 index 000000000..aa057f4b5 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/pdas.ts @@ -0,0 +1,20 @@ +import { Buffer } from 'buffer'; + +import { Pda, Program, PublicKey } from '../../types'; +import type { Convergence } from '../../Convergence'; + +export class VaultOperatorPdasClient { + constructor(protected readonly convergence: Convergence) {} + /** Finds the PDA of a given mint. */ + operator(vaultParams: PublicKey): Pda { + const programId = this.programId(); + return Pda.find(programId, [ + Buffer.from('operator', 'utf8'), + vaultParams.toBuffer(), + ]); + } + + private programId(programs?: Program[]) { + return this.convergence.programs().getVaultOperator(programs).address; + } +} diff --git a/packages/js/src/plugins/vaultOperatorModule/plugin.ts b/packages/js/src/plugins/vaultOperatorModule/plugin.ts new file mode 100644 index 000000000..d081c0524 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/plugin.ts @@ -0,0 +1,62 @@ +import { ProgramClient } from '../programModule'; +import { ConvergencePlugin, Program } from '../../types'; +import type { Convergence } from '../../Convergence'; +import { + createVaultOperation, + createVaultOperationHandler, + findVaultByAddressOperation, + findVaultByAddressOperationHandler, + findVaultsOperation, + findVaultsOperationHandler, + confirmAndPrepareVaultOperation, + confirmAndPrepareVaultOperationHandler, + withdrawVaultTokensOperation, + withdrawVaultTokensOperationHandler, +} from './operations'; +import { vaultOperatorProgram } from './program'; +import { VaultOperatorClient } from './client'; + +/** @group Plugins */ +export const vaultOperatorModule = (): ConvergencePlugin => ({ + install(cvg: Convergence) { + cvg.programs().register(vaultOperatorProgram); + cvg.programs().getVaultOperator = function ( + this: ProgramClient, + programs?: Program[] + ) { + return this.get(vaultOperatorProgram.name, programs); + }; + + const op = cvg.operations(); + op.register(createVaultOperation, createVaultOperationHandler); + op.register( + findVaultByAddressOperation, + findVaultByAddressOperationHandler + ); + op.register(findVaultsOperation, findVaultsOperationHandler); + op.register( + confirmAndPrepareVaultOperation, + confirmAndPrepareVaultOperationHandler + ); + op.register( + withdrawVaultTokensOperation, + withdrawVaultTokensOperationHandler + ); + + cvg.vaultOperator = function () { + return new VaultOperatorClient(this); + }; + }, +}); + +declare module '../../Convergence' { + interface Convergence { + vaultOperator(): VaultOperatorClient; + } +} + +declare module '../programModule/ProgramClient' { + interface ProgramClient { + getVaultOperator(programs?: Program[]): Program; + } +} diff --git a/packages/js/src/plugins/vaultOperatorModule/program.ts b/packages/js/src/plugins/vaultOperatorModule/program.ts new file mode 100644 index 000000000..4d434ff04 --- /dev/null +++ b/packages/js/src/plugins/vaultOperatorModule/program.ts @@ -0,0 +1,14 @@ +import { PROGRAM_ID } from '@convergence-rfq/vault-operator'; + +import { Program } from '../../types'; +import { Convergence } from '../../index'; +import { GpaBuilder } from '../../utils'; + +/** @group Programs */ +export const vaultOperatorProgram: Program = { + name: 'VaultOperatorProgram', + address: PROGRAM_ID, + gpaResolver: (convergence: Convergence) => { + return new GpaBuilder(convergence, PROGRAM_ID); + }, +}; diff --git a/packages/js/src/plugins/whitelistModule/WhitelistClient.ts b/packages/js/src/plugins/whitelistModule/WhitelistClient.ts index d8b803917..5c27b1288 100644 --- a/packages/js/src/plugins/whitelistModule/WhitelistClient.ts +++ b/packages/js/src/plugins/whitelistModule/WhitelistClient.ts @@ -2,17 +2,11 @@ import { OperationOptions } from '../../types'; import type { Convergence } from '../../Convergence'; import { findWhitelistByAddressOperation, - FindWhitelistsByCreatorInput, - findWhitelistsByCreatorOperation, FindWhitelistByAddressInput, CreateWhitelistInput, createWhitelistOperation, CheckAddressExistsOnWhitelistInput, checkAddressExistsOnWhitelistOperation, - AddAddressToWhitelistInput, - addAddressToWhitelistOperation, - RemoveAddressFromWhitelistInput, - removeAddressFromWhitelistOperation, CleanUpWhitelistInput, cleanUpWhitelistOperation, } from './operations'; @@ -37,16 +31,6 @@ export class WhitelistClient { .execute(findWhitelistByAddressOperation(input), options); } - /** {@inheritDoc findWhitelistByCreator} */ - findWhitelistsByCreator( - input: FindWhitelistsByCreatorInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(findWhitelistsByCreatorOperation(input), options); - } - /** {@inheritDoc checkAddressExistsOnWhitelist} */ checkAddressExistsOnWhitelist( input: CheckAddressExistsOnWhitelistInput, @@ -57,26 +41,6 @@ export class WhitelistClient { .execute(checkAddressExistsOnWhitelistOperation(input), options); } - /** {@inheritDoc addAddressToWhitelist} */ - addAddressToWhitelist( - input: AddAddressToWhitelistInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(addAddressToWhitelistOperation(input), options); - } - - /** {@inheritDoc removeAddressFromWhitelist} */ - removeAddressFromWhitelist( - input: RemoveAddressFromWhitelistInput, - options?: OperationOptions - ) { - return this.convergence - .operations() - .execute(removeAddressFromWhitelistOperation(input), options); - } - /** {@inheritDoc cleanUpWhitelist} */ cleanUpWhitelist(input: CleanUpWhitelistInput, options?: OperationOptions) { return this.convergence diff --git a/packages/js/src/plugins/whitelistModule/helpers.ts b/packages/js/src/plugins/whitelistModule/helpers.ts deleted file mode 100644 index d7152f588..000000000 --- a/packages/js/src/plugins/whitelistModule/helpers.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function calculateWhitelistSize(expectedWhitelistCapacity: number) { - return 32 * expectedWhitelistCapacity; -} diff --git a/packages/js/src/plugins/whitelistModule/index.ts b/packages/js/src/plugins/whitelistModule/index.ts index b7d7225b2..667982a88 100644 --- a/packages/js/src/plugins/whitelistModule/index.ts +++ b/packages/js/src/plugins/whitelistModule/index.ts @@ -1,4 +1,3 @@ -export * from './helpers'; export * from './operations'; export * from './models'; export * from './plugin'; diff --git a/packages/js/src/plugins/whitelistModule/models/Whitelist.ts b/packages/js/src/plugins/whitelistModule/models/Whitelist.ts index 39196d4b9..aab7d2c8e 100644 --- a/packages/js/src/plugins/whitelistModule/models/Whitelist.ts +++ b/packages/js/src/plugins/whitelistModule/models/Whitelist.ts @@ -18,9 +18,6 @@ export type Whitelist = { /** The address of the whitelist */ readonly address: PublicKey; - /** Max capacity of whitelist. */ - readonly capacity: number; - /** Whitelisted Addresses */ readonly whitelist: PublicKey[]; }; @@ -40,7 +37,6 @@ export const toWhitelist = (account: WhitelistAccount): Whitelist => { model: 'whitelist', address: account.publicKey, creator: data.creator, - capacity: data.capacity, whitelist: data.whitelist, }; @@ -49,7 +45,6 @@ export const toWhitelist = (account: WhitelistAccount): Whitelist => { model: 'whitelist', address: account.publicKey, creator: data.creator, - capacity: data.capacity, whitelist: data.whitelist, }; }; diff --git a/packages/js/src/plugins/whitelistModule/operations/addAddressToWhitelist.ts b/packages/js/src/plugins/whitelistModule/operations/addAddressToWhitelist.ts deleted file mode 100644 index 399a9eb22..000000000 --- a/packages/js/src/plugins/whitelistModule/operations/addAddressToWhitelist.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { createAddAddressToWhitelistInstruction } from '@convergence-rfq/rfq'; -import { PublicKey, Signer } from '@solana/web3.js'; - -import { - Operation, - OperationHandler, - OperationScope, - makeConfirmOptionsFinalizedOnMainnet, - useOperation, -} from '../../../types'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '../../../utils/TransactionBuilder'; -import { SendAndConfirmTransactionResponse } from '../../rpcModule'; -import { Convergence } from '../../../Convergence'; - -const Key = 'AddAddressToWhitelistOperation' as const; - -/** - * Add new address to the whitelist. - * - * ```ts - * await convergence - * .rfqs() - * .AddAddressToWhitelist({ - * creator?: Signer; - * whitelist: PublicKey; - * addressToAdd: PublicKey; - * }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const addAddressToWhitelistOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type AddAddressToWhitelistOperation = Operation< - typeof Key, - AddAddressToWhitelistInput, - AddAddressToWhitelistOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type AddAddressToWhitelistInput = { - creator?: Signer; - whitelist: PublicKey; - addressToAdd: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type AddAddressToWhitelistOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const addAddressToWhitelistOperationHandler: OperationHandler = - { - handle: async ( - operation: AddAddressToWhitelistOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const { whitelist, addressToAdd } = operation.input; - - const builder = await AddAddressToWhitelistBuilder( - convergence, - { - whitelist, - addressToAdd, - }, - scope - ); - scope.throwIfCanceled(); - const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( - convergence, - scope.confirmOptions - ); - - const { response } = await builder.sendAndConfirm( - convergence, - confirmOptions - ); - scope.throwIfCanceled(); - return { response }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type AddAddressToWhitelistBuilderParams = AddAddressToWhitelistInput & { - whitelist: PublicKey; - addressToAdd: PublicKey; -}; - -/** - * @group Transaction Builders - * @category Outputs - */ - -export type AddAddressToWhitelistBuilderResult = TransactionBuilder; - -/** - * @group Transaction Builders - * @category Constructors - */ - -export const AddAddressToWhitelistBuilder = async ( - convergence: Convergence, - params: AddAddressToWhitelistBuilderParams, - options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - - const { whitelist, addressToAdd, creator = convergence.identity() } = params; - - const whitelistAccount = await convergence - .whitelist() - .findWhitelistByAddress({ - address: whitelist, - }); - - if (whitelistAccount.whitelist.length === whitelistAccount.capacity) { - throw new Error('WhitelistMaximumCapacityReached'); - } - - const addressAlreadyExists = await convergence - .whitelist() - .checkAddressExistsOnWhitelist({ - whitelistAddress: whitelist, - addressToSearch: addressToAdd, - }); - if (addressAlreadyExists) { - throw new Error('AddressAlreadyExistsOnWhitelist'); - } - - const systemProgram = convergence.programs().getSystem(programs); - const rfqProgram = convergence.programs().getRfq(programs); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createAddAddressToWhitelistInstruction( - { - creator: creator.publicKey, - whitelistAccount: whitelist, - systemProgram: systemProgram.address, - }, - { - address: addressToAdd, - }, - rfqProgram.address - ), - signers: [creator], - key: 'AddAddressToWhitelist', - }); -}; diff --git a/packages/js/src/plugins/whitelistModule/operations/cleanupWhitelist.ts b/packages/js/src/plugins/whitelistModule/operations/cleanupWhitelist.ts index c193205fe..36daf2dd0 100644 --- a/packages/js/src/plugins/whitelistModule/operations/cleanupWhitelist.ts +++ b/packages/js/src/plugins/whitelistModule/operations/cleanupWhitelist.ts @@ -125,6 +125,7 @@ export const cleanUpWhitelistBuilder = async ( return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCleanUpWhitelistInstruction( { diff --git a/packages/js/src/plugins/whitelistModule/operations/createWhitelist.ts b/packages/js/src/plugins/whitelistModule/operations/createWhitelist.ts index 838089aef..dab4b138d 100644 --- a/packages/js/src/plugins/whitelistModule/operations/createWhitelist.ts +++ b/packages/js/src/plugins/whitelistModule/operations/createWhitelist.ts @@ -1,6 +1,5 @@ import { createCreateWhitelistInstruction } from '@convergence-rfq/rfq'; import { PublicKey, Keypair } from '@solana/web3.js'; -import { calculateWhitelistSize } from '../helpers'; import { Whitelist, assertWhitelist } from '../models/Whitelist'; import { Operation, @@ -53,7 +52,6 @@ export type CreateWhitelistOperation = Operation< */ export type CreateWhitelistInput = { creator: PublicKey; - capacity: number; whitelist: PublicKey[]; }; @@ -80,13 +78,12 @@ export const createWhitelistOperationHandler: OperationHandler => { - const { creator, capacity, whitelist } = operation.input; + const { creator, whitelist } = operation.input; const whitelistKeypair = Keypair.generate(); const builder = await createWhitelistBuilder( convergence, { creator, - capacity, whitelist, whitelistKeypair, }, @@ -134,13 +131,14 @@ export const createWhitelistBuilder = async ( ): Promise => { const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - const { creator, capacity, whitelist, whitelistKeypair } = params; + const { creator, whitelist, whitelistKeypair } = params; const systemProgram = convergence.programs().getSystem(programs); const rfqProgram = convergence.programs().getRfq(programs); return TransactionBuilder.make() .setFeePayer(payer) + .addTxPriorityFeeIx(convergence) .add({ instruction: createCreateWhitelistInstruction( { @@ -150,7 +148,6 @@ export const createWhitelistBuilder = async ( }, { whitelist, - expectedWhitelistSize: calculateWhitelistSize(capacity), }, rfqProgram.address ), diff --git a/packages/js/src/plugins/whitelistModule/operations/findWhitelistsByCreator.ts b/packages/js/src/plugins/whitelistModule/operations/findWhitelistsByCreator.ts deleted file mode 100644 index 78e9d72eb..000000000 --- a/packages/js/src/plugins/whitelistModule/operations/findWhitelistsByCreator.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; - -import { Whitelist, toWhitelist } from '../models'; - -import { Convergence } from '../../../Convergence'; -import { toWhitelistAccount } from '../account'; -import { WhitelistGpaBuilder } from '../WhitelistGpaBuilder'; -import { - Operation, - OperationHandler, - OperationScope, - useOperation, -} from '../../../types'; - -const Key = 'FindWhitelistsByCreatorOperation' as const; - -/** - * Finds Whitelists by creator. - * - * ```ts - * const whitelists = await convergence - * .whitelist() - * .findWhitelistsByCreator({ creator }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const findWhitelistsByCreatorOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type FindWhitelistsByCreatorOperation = Operation< - typeof Key, - FindWhitelistsByCreatorInput, - FindWhitelistsByCreatorOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type FindWhitelistsByCreatorInput = { - /** The address of the Rfq. */ - creator: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type FindWhitelistsByCreatorOutput = Whitelist[]; - -/** - * @group Operations - * @category Handlers - */ -export const findWhitelistsByCreatorOperationHandler: OperationHandler = - { - handle: async ( - operation: FindWhitelistsByCreatorOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const { creator } = operation.input; - scope.throwIfCanceled(); - const whitelistGpaBuilder = new WhitelistGpaBuilder(convergence); - const accounts = await whitelistGpaBuilder.whereCreator(creator).get(); - const whitelists = accounts.map((account) => - toWhitelist(toWhitelistAccount(account)) - ); - scope.throwIfCanceled(); - - return whitelists; - }, - }; diff --git a/packages/js/src/plugins/whitelistModule/operations/index.ts b/packages/js/src/plugins/whitelistModule/operations/index.ts index cd5d5acb3..bd7d6519a 100644 --- a/packages/js/src/plugins/whitelistModule/operations/index.ts +++ b/packages/js/src/plugins/whitelistModule/operations/index.ts @@ -1,7 +1,4 @@ export * from './findWhitelistByAddress'; -export * from './findWhitelistsByCreator'; export * from './createWhitelist'; -export * from './addAddressToWhitelist'; -export * from './removeAddressFromWhitelist'; export * from './cleanupWhitelist'; export * from './checkAddressExistsOnWhitelist'; diff --git a/packages/js/src/plugins/whitelistModule/operations/removeAddressFromWhitelist.ts b/packages/js/src/plugins/whitelistModule/operations/removeAddressFromWhitelist.ts deleted file mode 100644 index fd71905b3..000000000 --- a/packages/js/src/plugins/whitelistModule/operations/removeAddressFromWhitelist.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { createRemoveAddressFromWhitelistInstruction } from '@convergence-rfq/rfq'; -import { PublicKey, Signer } from '@solana/web3.js'; - -import { - Operation, - OperationHandler, - OperationScope, - makeConfirmOptionsFinalizedOnMainnet, - useOperation, -} from '../../../types'; -import { SendAndConfirmTransactionResponse } from '@/plugins/rpcModule'; -import { Convergence } from '@/Convergence'; -import { - TransactionBuilder, - TransactionBuilderOptions, -} from '@/utils/TransactionBuilder'; - -const Key = 'RemoveAddressFromWhitelistOperation' as const; - -/** - * remove address from Whitelist. - * - * ```ts - * await convergence - * .whitelist() - * .removeAddressFromWhitelist({ - * creator?: Signer; - * whitelist: PublicKey; - * addressToRemove: PublicKey; - * }); - * ``` - * - * @group Operations - * @category Constructors - */ -export const removeAddressFromWhitelistOperation = - useOperation(Key); - -/** - * @group Operations - * @category Types - */ -export type RemoveAddressFromWhitelistOperation = Operation< - typeof Key, - RemoveAddressFromWhitelistInput, - RemoveAddressFromWhitelistOutput ->; - -/** - * @group Operations - * @category Inputs - */ -export type RemoveAddressFromWhitelistInput = { - creator?: Signer; - whitelist: PublicKey; - addressToRemove: PublicKey; -}; - -/** - * @group Operations - * @category Outputs - */ -export type RemoveAddressFromWhitelistOutput = { - /** The blockchain response from sending and confirming the transaction. */ - response: SendAndConfirmTransactionResponse; -}; - -/** - * @group Operations - * @category Handlers - */ -export const removeAddressFromWhitelistOperationHandler: OperationHandler = - { - handle: async ( - operation: RemoveAddressFromWhitelistOperation, - convergence: Convergence, - scope: OperationScope - ): Promise => { - const { whitelist, addressToRemove } = operation.input; - - const whitelistAccount = await convergence - .whitelist() - .findWhitelistByAddress({ - address: whitelist, - }); - - if (whitelistAccount.whitelist.length === 0) { - throw new Error('WhitelistIsEmpty'); - } - const builder = await RemoveAddressFromWhitelistBuilder( - convergence, - { - whitelist, - addressToRemove, - }, - scope - ); - - const confirmOptions = makeConfirmOptionsFinalizedOnMainnet( - convergence, - scope.confirmOptions - ); - const { response } = await builder.sendAndConfirm( - convergence, - confirmOptions - ); - scope.throwIfCanceled(); - - return { response }; - }, - }; - -/** - * @group Transaction Builders - * @category Inputs - */ -export type RemoveAddressFromWhitelistBuilderParams = - RemoveAddressFromWhitelistInput & { - whitelist: PublicKey; - addressToRemove: PublicKey; - }; - -/** - * @group Transaction Builders - * @category Outputs - * - * */ - -export type RemoveAddressFromWhitelistBuilderResult = TransactionBuilder; - -export const RemoveAddressFromWhitelistBuilder = async ( - convergence: Convergence, - params: RemoveAddressFromWhitelistBuilderParams, - options: TransactionBuilderOptions = {} -): Promise => { - const { programs, payer = convergence.rpc().getDefaultFeePayer() } = options; - - const { - whitelist, - addressToRemove, - creator = convergence.identity(), - } = params; - - const systemProgram = convergence.programs().getSystem(programs); - const rfqProgram = convergence.programs().getRfq(programs); - - return TransactionBuilder.make() - .setFeePayer(payer) - .add({ - instruction: createRemoveAddressFromWhitelistInstruction( - { - creator: creator.publicKey, - whitelistAccount: whitelist, - systemProgram: systemProgram.address, - }, - { - address: addressToRemove, - }, - rfqProgram.address - ), - signers: [creator], - key: 'RemoveAddressFromWhitelist', - }); -}; diff --git a/packages/js/src/plugins/whitelistModule/plugin.ts b/packages/js/src/plugins/whitelistModule/plugin.ts index 29acd00b6..622ce1faf 100644 --- a/packages/js/src/plugins/whitelistModule/plugin.ts +++ b/packages/js/src/plugins/whitelistModule/plugin.ts @@ -1,14 +1,8 @@ import { findWhitelistByAddressOperation, findWhitelistByAddressOperationHandler, - findWhitelistsByCreatorOperation, - findWhitelistsByCreatorOperationHandler, createWhitelistOperation, createWhitelistOperationHandler, - addAddressToWhitelistOperation, - addAddressToWhitelistOperationHandler, - removeAddressFromWhitelistOperation, - removeAddressFromWhitelistOperationHandler, checkAddressExistsOnWhitelistOperation, checkAddressExistsOnWhitelistOperationHandler, cleanUpWhitelistOperation, @@ -28,18 +22,7 @@ export const whitelistModule = (): ConvergencePlugin => ({ findWhitelistByAddressOperation, findWhitelistByAddressOperationHandler ); - op.register( - findWhitelistsByCreatorOperation, - findWhitelistsByCreatorOperationHandler - ); - op.register( - addAddressToWhitelistOperation, - addAddressToWhitelistOperationHandler - ); - op.register( - removeAddressFromWhitelistOperation, - removeAddressFromWhitelistOperationHandler - ); + op.register( checkAddressExistsOnWhitelistOperation, checkAddressExistsOnWhitelistOperationHandler diff --git a/packages/js/src/utils/TransactionBuilder.ts b/packages/js/src/utils/TransactionBuilder.ts index 2502cd9b3..9f3894953 100644 --- a/packages/js/src/utils/TransactionBuilder.ts +++ b/packages/js/src/utils/TransactionBuilder.ts @@ -1,6 +1,8 @@ import { BlockhashWithExpiryBlockHeight, + ComputeBudgetProgram, ConfirmOptions, + Keypair, PACKET_DATA_SIZE, SignaturePubkeyPair, Transaction, @@ -9,6 +11,7 @@ import { import { SendAndConfirmTransactionResponse } from '../plugins/rpcModule'; import type { Convergence } from '../Convergence'; import type { OperationOptions, Signer } from '../types'; +import { TRANSACTION_PRIORITY_FEE_MAP } from '../constants'; export const DUMMY_BLOCKHASH = 'H9cCgV1suCbdxMGDGUecdgJPZzdCe4CbNYa6ijP1uBLS'; @@ -210,6 +213,75 @@ export class TransactionBuilder { return transaction; } + toPartiallySignedTransaction( + blockhashWithExpiryBlockHeight: BlockhashWithExpiryBlockHeight, + options: TransactionOptions = {} + ): Transaction { + const transaction = this.toTransaction( + blockhashWithExpiryBlockHeight, + options + ); + const keypairSigners = this.getSigners().filter( + (s): s is Keypair => s instanceof Keypair + ); + if (keypairSigners.length > 0) { + transaction.partialSign(...keypairSigners); + } + + return transaction; + } + + protected cloneWithoutRecords(): TransactionBuilder { + const result = TransactionBuilder.make(this.transactionOptions); + if (this.feePayer !== undefined) { + result.setFeePayer(this.feePayer); + } + + result.setContext(this.context); + + return result; + } + + divideToMultipleBuildersThatFit(): TransactionBuilder[] { + if (this.checkTransactionFits()) { + return [this]; + } + + if (this.records.length === 0) { + return []; + } + + const builders: TransactionBuilder[] = []; + let unprocessedRecords = [...this.records]; + + while (unprocessedRecords.length > 0) { + let builderAdded = false; + for ( + let recordsToTake = unprocessedRecords.length; + recordsToTake > 0; + recordsToTake-- + ) { + const records = unprocessedRecords.slice(0, recordsToTake); + const builder = this.cloneWithoutRecords().append(...records); + + if (builder.checkTransactionFits()) { + builders.push(builder); + unprocessedRecords = unprocessedRecords.slice(recordsToTake); + builderAdded = true; + break; + } + } + + if (!builderAdded) { + throw new Error( + `Instruction ${unprocessedRecords[0].key} is too big to fit into the transaction` + ); + } + } + + return builders; + } + async sendAndConfirm( convergence: Convergence, confirmOptions?: ConfirmOptions @@ -223,4 +295,20 @@ export class TransactionBuilder { ...this.getContext(), }; } + + addTxPriorityFeeIx(convergence: Convergence) { + if (!convergence.transactionPriority) { + return this; + } + const txPriorityInMicroLamports = + typeof convergence.transactionPriority === 'number' + ? convergence.transactionPriority + : TRANSACTION_PRIORITY_FEE_MAP[convergence.transactionPriority]; + return this.add({ + instruction: ComputeBudgetProgram.setComputeUnitPrice({ + microLamports: txPriorityInMicroLamports, + }), + signers: [], + }); + } } diff --git a/packages/js/src/utils/Wallets.ts b/packages/js/src/utils/Wallets.ts index 6b4500aa1..d6e19c85c 100644 --- a/packages/js/src/utils/Wallets.ts +++ b/packages/js/src/utils/Wallets.ts @@ -1,4 +1,9 @@ -import { Keypair, PublicKey, Transaction } from '@solana/web3.js'; +import { + Keypair, + PublicKey, + Transaction, + VersionedTransaction, +} from '@solana/web3.js'; import { Convergence } from '..'; interface Wallet { @@ -18,20 +23,34 @@ export class CvgWallet implements Wallet { this.publicKey = convergence.identity().publicKey; } - signTransaction = (tx: Transaction): Promise => { - return this.convergence.identity().signTransaction(tx); + signTransaction = ( + tx: T + ): Promise => { + if (tx instanceof VersionedTransaction) { + throw new Error('Versioned transactions are not supported yet'); + } + + return this.convergence.identity().signTransaction(tx) as Promise; }; - signAllTransactions = (txs: Transaction[]): Promise => { - return this.convergence.identity().signAllTransactions(txs); + signAllTransactions = ( + txs: T[] + ): Promise => { + if (txs.find((tx) => tx instanceof VersionedTransaction) !== undefined) { + throw new Error('Versioned transactions are not supported yet'); + } + + return this.convergence + .identity() + .signAllTransactions(txs as Transaction[]) as Promise; }; } export class NoopWallet { public readonly publicKey: PublicKey; - constructor(keypair: Keypair) { - this.publicKey = keypair.publicKey; + constructor(publicKey: PublicKey) { + this.publicKey = publicKey; } // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/packages/js/src/utils/cache.ts b/packages/js/src/utils/cache.ts index 4f586e23f..eb1accdf2 100644 --- a/packages/js/src/utils/cache.ts +++ b/packages/js/src/utils/cache.ts @@ -3,10 +3,15 @@ interface CahcedValue { time: number; } +export type CvgCache = { + get: (...u: U) => Promise; + clear: () => void; +}; + export const useCache = ( valueGetter: (...u: U) => Promise, stalenessSeconds = 300 -) => { +): CvgCache => { const stalenessMs = stalenessSeconds * 1_000; let cache: CahcedValue | null = null; let operation: Promise | undefined; @@ -43,4 +48,4 @@ export const useCache = ( operation = undefined; }, }; -}; \ No newline at end of file +}; diff --git a/packages/js/src/utils/classes.ts b/packages/js/src/utils/classes.ts index 23a42ce0e..f775a69eb 100644 --- a/packages/js/src/utils/classes.ts +++ b/packages/js/src/utils/classes.ts @@ -32,6 +32,7 @@ export class InstructionUniquenessTracker { ) ); }; + checkedAdd( ix: TransactionInstruction | TransactionBuilder, ixType: IxType @@ -57,6 +58,19 @@ export class InstructionUniquenessTracker { throw new Error('Invalid Instruction type'); } } + + static dedup(builders: TransactionBuilder[]): TransactionBuilder[] { + const tracker = new InstructionUniquenessTracker([]); + const result = []; + for (const builder of builders) { + const isUnique = tracker.checkedAdd(builder, 'TransactionBuilder'); + if (isUnique) { + result.push(builder); + } + } + + return result; + } } export class RfqTimers { diff --git a/packages/js/src/utils/types.ts b/packages/js/src/utils/types.ts index 548ba40e3..75084a54b 100644 --- a/packages/js/src/utils/types.ts +++ b/packages/js/src/utils/types.ts @@ -13,3 +13,5 @@ export type RequiredKeys = Omit< export type Option = T | null; export type Opaque = T & { __opaque__: K }; + +export type TransactionPriority = 'none' | 'normal' | 'high' | 'turbo' | number; diff --git a/packages/js/tests/helpers.ts b/packages/js/tests/helpers.ts index 6678ea17a..7fa1d6915 100644 --- a/packages/js/tests/helpers.ts +++ b/packages/js/tests/helpers.ts @@ -20,7 +20,7 @@ import { SpotLegInstrument, Mint, } from '../src'; -import { getUserKp, RPC_ENDPOINT } from '../../validator'; +import { getUserKp, HXRO_RISK_ENGINE, RPC_ENDPOINT } from '../../validator'; import { BASE_MINT_BTC_PK, QUOTE_MINT_PK } from './constants'; const DEFAULT_COMMITMENT = 'confirmed'; const DEFAULT_SKIP_PREFLIGHT = true; @@ -40,7 +40,10 @@ export const createCvg = (options: ConvergenceTestOptions = {}) => { commitment: options.commitment ?? DEFAULT_COMMITMENT, wsEndpoint: options.wsEndpoint, }); - return Convergence.make(connection, { skipPreflight: options.skipPreflight }); + return Convergence.make(connection, { + skipPreflight: options.skipPreflight, + transactionPriority: 'normal', + }); }; // Default user is dao but could be maker or taker @@ -71,6 +74,14 @@ export const sleep = (seconds: number) => { return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); }; +export async function runInParallelWithWait( + promiseGetter: () => Promise, + waitInSeconds: number +): Promise { + const [result] = await Promise.all([promiseGetter(), sleep(waitInSeconds)]); + return result; +} + export const fetchTokenAmount = async ( cvg: Convergence, mintAddress: PublicKey @@ -113,6 +124,7 @@ export const createAmericanCoveredCallRfq = async ( instruments: [ await SpotLegInstrument.create(cvg, baseMint, 1.0, 'long'), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -146,6 +158,7 @@ export const createEuropeanCoveredCallRfq = async ( instruments: [ await SpotLegInstrument.create(cvg, baseMint, 1.0, 'long'), await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -179,6 +192,7 @@ export const createEuropeanOpenSizeCallSpdOptionRfq = async ( const { rfq, response } = await cvg.rfqs().createAndFinalize({ instruments: [ await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -192,6 +206,7 @@ export const createEuropeanOpenSizeCallSpdOptionRfq = async ( expirationTimestamp ), await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -223,6 +238,7 @@ export const createAmericanFixedBaseStraddle = async ( const { rfq, response } = await cvg.rfqs().createAndFinalize({ instruments: [ await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -234,6 +250,7 @@ export const createAmericanFixedBaseStraddle = async ( expirationTimestamp ), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -266,6 +283,7 @@ export const createEuropeanFixedBaseStraddle = async ( const { rfq, response } = await cvg.rfqs().createAndFinalize({ instruments: [ await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -279,6 +297,7 @@ export const createEuropeanFixedBaseStraddle = async ( expirationTimestamp ), await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -311,6 +330,7 @@ export const createAmericanOpenSizeCallSpdOptionRfq = async ( const { rfq, response } = await cvg.rfqs().createAndFinalize({ instruments: [ await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -322,6 +342,7 @@ export const createAmericanOpenSizeCallSpdOptionRfq = async ( expirationTimestamp ), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -358,6 +379,7 @@ export const createCFlyRfq = async ( const { rfq } = await cvg.rfqs().createAndFinalize({ instruments: [ await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -369,6 +391,7 @@ export const createCFlyRfq = async ( expirationTimestamp ), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -380,6 +403,7 @@ export const createCFlyRfq = async ( expirationTimestamp ), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -404,11 +428,12 @@ export const createRfq = async ( cvg: Convergence, amount: number, orderType: OrderType, + counterParties: PublicKey[] = [], activeWindow?: number, - whitelist?: PublicKey, rfqType: 'open' | 'fixed-base' | 'fixed-quote' = 'fixed-base', quoteMintPk = QUOTE_MINT_PK, baseMintPk = BASE_MINT_BTC_PK + // 10 minutes ) => { let instrumentAmount = 1; @@ -433,7 +458,7 @@ export const createRfq = async ( fixedSize: { type: rfqType, amount: fixedSizeAmount }, quoteAsset: await SpotQuoteInstrument.create(cvg, quoteMint), activeWindow, - whitelistAddress: whitelist, + counterParties: counterParties.length > 0 ? counterParties : undefined, }); return { rfq, response }; }; @@ -450,7 +475,6 @@ export const respondToRfq = async ( throw new Error('Must provide bid and/or ask'); } return await cvg.rfqs().respond({ - maker: cvg.identity(), rfq: rfq.address, bid: bid ? { price: bid, legsMultiplier } : undefined, ask: ask ? { price: ask, legsMultiplier } : undefined, @@ -477,10 +501,7 @@ export const settleRfq = async ( response: Response ) => { return await cvg.rfqs().settle({ - rfq: rfq.address, response: response.address, - maker: response.maker, - taker: rfq.taker, }); }; @@ -545,6 +566,7 @@ export const createAmericanIronCondor = async ( const { rfq } = await cvg.rfqs().createAndFinalize({ instruments: [ await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -556,6 +578,7 @@ export const createAmericanIronCondor = async ( expirationTimestamp ), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -567,6 +590,7 @@ export const createAmericanIronCondor = async ( expirationTimestamp ), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -578,6 +602,7 @@ export const createAmericanIronCondor = async ( expirationTimestamp ), await PsyoptionsAmericanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -610,6 +635,7 @@ export const createEuropeanIronCondor = async ( const { rfq } = await cvg.rfqs().createAndFinalize({ instruments: [ await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -623,6 +649,7 @@ export const createEuropeanIronCondor = async ( expirationTimestamp ), await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -636,6 +663,7 @@ export const createEuropeanIronCondor = async ( expirationTimestamp ), await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -649,6 +677,7 @@ export const createEuropeanIronCondor = async ( expirationTimestamp ), await PsyoptionsEuropeanInstrument.create( + cvg.identity().publicKey, cvg, baseMint, quoteMint, @@ -684,3 +713,23 @@ export const expectError = async (promise: Promise, errorText: string) => { } } }; + +let hxroOperatorTRGInitialized = false; + +export const ensureHxroOperatorTRGInitialized = async ( + cvgAuthority: Convergence +) => { + if (hxroOperatorTRGInitialized) { + return; + } + + await cvgAuthority.hxro().initializeOperatorTraderRiskGroup({ + hxroRiskEngineAddress: new PublicKey(HXRO_RISK_ENGINE), + }); + + hxroOperatorTRGInitialized = true; +}; + +export const applySpotQuoteFee = (value: number) => { + return value * 0.99; +}; diff --git a/packages/js/tests/integration/hxro.spec.ts b/packages/js/tests/integration/hxro.spec.ts new file mode 100644 index 000000000..218ea2fdc --- /dev/null +++ b/packages/js/tests/integration/hxro.spec.ts @@ -0,0 +1,333 @@ +import { + HxroAdditionalRespondData, + HxroPrintTrade, + PrintTrade, +} from '../../src'; +import { + createUserCvg, + ensureHxroOperatorTRGInitialized, + runInParallelWithWait, + sleep, +} from '../helpers'; +import { CTX, DAO_PK, MAKER_PK } from '../constants'; + +describe('integration.hxro', () => { + const cvgTaker = createUserCvg('taker'); + const cvgMaker = createUserCvg('maker'); + const cvgAuthority = createUserCvg('dao'); + + let commonPrintTrade: PrintTrade; + + before(async () => { + await ensureHxroOperatorTRGInitialized(cvgAuthority); + const products = await cvgTaker.hxro().fetchProducts(); + commonPrintTrade = new HxroPrintTrade(cvgTaker, CTX.hxroTakerTrg, [ + { amount: 1, side: 'long', productInfo: products[0] }, + ]); + }); + + it('create, cancel and clean up', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 1000, + settlingWindow: 5000, + }); + await cvgTaker.rfqs().cancelRfq({ rfq: rfq.address }); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('create, wait for expire and clean up', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 1, + settlingWindow: 5000, + }); + await sleep(1.5); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('create, respond, wait for expire and clean up', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 2, + settlingWindow: 5000, + }); + const { rfqResponse } = await runInParallelWithWait( + () => + cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100, legsMultiplier: 1 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }), + 2.5 + ); + + await cvgMaker.rfqs().cleanUpResponse({ response: rfqResponse.address }); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('settle and clean up', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 1000, + settlingWindow: 5000, + }); + + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 123, legsMultiplier: 1 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + await cvgTaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + + await cvgMaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + + await cvgTaker.rfqs().settle({ + response: rfqResponse.address, + }); + await cvgTaker.rfqs().cleanUpResponse({ response: rfqResponse.address }); + await cvgTaker.rfqs().cancelRfq({ rfq: rfq.address }); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('settle after settling window ends and clean up', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 3, + settlingWindow: 1, + }); + const rfqResponse = await runInParallelWithWait(async () => { + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100, legsMultiplier: 1 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + await cvgTaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + + await cvgMaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + return rfqResponse; + }, 4.5); + + await cvgTaker.rfqs().settle({ + response: rfqResponse.address, + }); + await cvgTaker.rfqs().cleanUpResponse({ response: rfqResponse.address }); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('confirm, but taker defaults', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 3, + settlingWindow: 1, + }); + + const rfqResponse = await runInParallelWithWait(async () => { + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100, legsMultiplier: 1 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + await cvgMaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + + return rfqResponse; + }, 4.5); + + await cvgMaker.rfqs().revertSettlementPreparation({ + response: rfqResponse.address, + side: 'maker', + }); + + await cvgMaker.rfqs().cleanUpResponse({ response: rfqResponse.address }); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('confirm, but maker defaults', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 3, + settlingWindow: 1, + }); + + const rfqResponse = await runInParallelWithWait(async () => { + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100, legsMultiplier: 1 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + await cvgTaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + + return rfqResponse; + }, 4.5); + + await cvgTaker.rfqs().revertSettlementPreparation({ + response: rfqResponse.address, + side: 'taker', + }); + + await cvgMaker.rfqs().cleanUpResponse({ response: rfqResponse.address }); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('confirm, but both default', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 3, + settlingWindow: 1, + }); + + const rfqResponse = await runInParallelWithWait(async () => { + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100, legsMultiplier: 1 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + return rfqResponse; + }, 4.5); + + await cvgMaker.rfqs().cleanUpResponse({ response: rfqResponse.address }); + await cvgTaker.rfqs().cleanUpRfq({ rfq: rfq.address }); + }); + + it('confirm, but taker unlocks collateral and defaults on settlement', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'fixed-base', amount: 100 }, + activeWindow: 3600, + settlingWindow: 3600, + }); + + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + await cvgTaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + await cvgTaker.hxro().unlockCollateralByRecord({ + lockRecord: cvgTaker + .hxro() + .pdas() + .lockedCollateralRecord( + cvgTaker.identity().publicKey, + rfqResponse.address + ), + action: 'unlock', + }); + await cvgMaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + await cvgMaker.rfqs().settle({ + response: rfqResponse.address, + }); + + await cvgMaker.rfqs().revertSettlementPreparation({ + response: rfqResponse.address, + side: 'taker', + }); + await cvgMaker.rfqs().revertSettlementPreparation({ + response: rfqResponse.address, + side: 'maker', + }); + + await cvgMaker.rfqs().cleanUpResponse({ response: rfqResponse.address }); + }); + + it('Create a future rfq with counterparties', async () => { + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: commonPrintTrade, + orderType: 'buy', + fixedSize: { type: 'fixed-base', amount: 100 }, + activeWindow: 3600, + settlingWindow: 3600, + counterParties: [MAKER_PK, DAO_PK], + }); + + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + }); +}); diff --git a/packages/js/tests/integration/psyoptionsEuropean.spec.ts b/packages/js/tests/integration/psyoptionsEuropean.spec.ts index e038ae827..e42d96778 100644 --- a/packages/js/tests/integration/psyoptionsEuropean.spec.ts +++ b/packages/js/tests/integration/psyoptionsEuropean.spec.ts @@ -13,9 +13,8 @@ import { createPythPriceFeed, } from '../helpers'; import { BASE_MINT_BTC_PK, QUOTE_MINT_PK } from '../constants'; -import { PublicKey } from '../../src'; -import { CvgWallet } from '../../src/utils/Wallets'; -import { IDL as PseudoPythIdl } from '../../../validator/fixtures/programs/pseudo_pyth_idl'; +import { CvgWallet, PublicKey } from '../../src'; +import { IDL as PseudoPythIdl } from '../../../validator/dependencies/pseudo_pyth_idl'; describe('integration.psyoptionsEuropean', () => { const takerCvg = createUserCvg('taker'); diff --git a/packages/js/tests/integration/spot.spec.ts b/packages/js/tests/integration/spot.spec.ts index 0e77af1a2..f640db3e4 100644 --- a/packages/js/tests/integration/spot.spec.ts +++ b/packages/js/tests/integration/spot.spec.ts @@ -38,6 +38,7 @@ describe('integration.spot', () => { it('sell', async () => { const baseAmount = 1.536_421; const quoteAmount = 22_000.86; + const feeAmount = quoteAmount * 0.01; // 1% is specified in fixtures const { rfq } = await createRfq(takerCvg, baseAmount, 'sell'); expect(rfq).toHaveProperty('address'); @@ -74,7 +75,9 @@ describe('integration.spot', () => { ]); // TODO: This does not seem right in terms of handling precision - expect(takerQuoteAfter).toBeCloseTo(takerQuoteBefore + quoteAmount); + expect(takerQuoteAfter).toBeCloseTo( + takerQuoteBefore + quoteAmount - feeAmount + ); expect(takerBtcAfter).toBeCloseTo(takerBtcBefore - baseAmount); }); @@ -173,18 +176,13 @@ describe('integration.spot', () => { const baseAmount = 2.5; const quoteAmount = 24_300.75 * baseAmount; - const { whitelist } = await takerCvg.whitelist().createWhitelist({ - creator: TAKER_PK, - capacity: 10, - whitelist: [MAKER_PK, DAO_PK], - }); - + const counterParties = [MAKER_PK, DAO_PK, TESTING_PK]; const { rfq } = await createRfq( takerCvg, baseAmount, 'two-way', - undefined, - whitelist.address + counterParties, + undefined ); expect(rfq).toHaveProperty('address'); const { rfqResponse } = await respondToRfq( @@ -206,19 +204,13 @@ describe('integration.spot', () => { it('Create a Rfq with a whitelist , maker is not whitelisted resulting in error in responding ', async () => { const baseAmount = 2.5; const quoteAmount = 24_300.75 * baseAmount; - - const { whitelist } = await takerCvg.whitelist().createWhitelist({ - creator: TAKER_PK, - capacity: 10, - whitelist: [DAO_PK, TESTING_PK], - }); - + const counterParties = [DAO_PK, TESTING_PK]; const { rfq } = await createRfq( takerCvg, baseAmount, 'two-way', - undefined, - whitelist.address + counterParties, + undefined ); expect(rfq).toHaveProperty('address'); diff --git a/packages/js/tests/integration/squads.spec.ts b/packages/js/tests/integration/squads.spec.ts new file mode 100644 index 000000000..246a82577 --- /dev/null +++ b/packages/js/tests/integration/squads.spec.ts @@ -0,0 +1,307 @@ +import * as multisig from '@sqds/multisig'; +import { + ComputeBudgetProgram, + Keypair, + Signer, + SystemProgram, + TransactionMessage, +} from '@solana/web3.js'; +import expect from 'expect'; +import { + CreateVaultInput, + Mint, + TransactionBuilder, + addDecimals, + createVaultBuilder, +} from '../../src'; +import { createUserCvg } from '../helpers'; +import { BASE_MINT_BTC_PK, QUOTE_MINT_PK } from '../constants'; + +const { Permission, Permissions } = multisig.types; + +describe('integration.squads', () => { + const cvg = createUserCvg('taker'); + const cvgSecond = createUserCvg('dao'); + const cvgMaker = createUserCvg('maker'); + const { connection } = cvg; + const creator = cvg.identity(); + let transactionIndex = BigInt(0); + + const createKey = Keypair.generate(); + + const [multisigPda] = multisig.getMultisigPda({ + createKey: createKey.publicKey, + }); + + const [squadsVault] = multisig.getVaultPda({ + multisigPda, + index: 0, + }); + + let baseMintBTC: Mint; + let quoteMint: Mint; + + before(async () => { + baseMintBTC = await cvg + .tokens() + .findMintByAddress({ address: BASE_MINT_BTC_PK }); + quoteMint = await cvg + .tokens() + .findMintByAddress({ address: QUOTE_MINT_PK }); + + await createAndFundSquads(); + }); + + const createAndFundSquads = async () => { + const programConfigPda = multisig.getProgramConfigPda({})[0]; + const programConfig = + await multisig.accounts.ProgramConfig.fromAccountAddress( + connection, + programConfigPda + ); + const configTreasury = programConfig.treasury; + const signature = await multisig.rpc.multisigCreateV2({ + connection, + createKey, + creator, + multisigPda, + configAuthority: null, + timeLock: 0, + members: [ + { + key: creator.publicKey, + permissions: Permissions.all(), + }, + { + key: cvgSecond.identity().publicKey, + permissions: Permissions.fromPermissions([ + Permission.Vote, + Permission.Execute, + ]), + }, + ], + threshold: 2, + rentCollector: null, + treasury: configTreasury, + }); + await connection.confirmTransaction(signature); + + await Promise.all([ + cvg.tokens().send({ + amount: { + basisPoints: addDecimals(100, baseMintBTC.decimals), + currency: baseMintBTC.currency, + }, + mintAddress: baseMintBTC.address, + toOwner: squadsVault, + }), + new TransactionBuilder() + .add({ + instruction: SystemProgram.transfer({ + fromPubkey: cvg.identity().publicKey, + toPubkey: squadsVault, + lamports: addDecimals(10, 9), + }), + signers: [cvg.identity()], + }) + .sendAndConfirm(cvg), + cvg.tokens().createToken({ mint: quoteMint.address, owner: squadsVault }), + ]); + }; + + const createProposal = async (vaultInput: CreateVaultInput) => { + transactionIndex += BigInt(1); + const transactionPda = multisig.getTransactionPda({ + multisigPda, + index: transactionIndex, + })[0]; + + const { + builder: vaultBuilder, + ataBuilder, + vaultAddress, + } = await createVaultBuilder(cvg, { + ...vaultInput, + squads: { transactionPda, vaultPda: squadsVault }, + }); + await ataBuilder.sendAndConfirm(cvg); + + const message = new TransactionMessage({ + payerKey: squadsVault, + recentBlockhash: (await connection.getLatestBlockhash()).blockhash, + instructions: [...vaultBuilder.getInstructions()], + }); + const signature1 = await multisig.rpc.vaultTransactionCreate({ + connection, + feePayer: creator, + multisigPda, + transactionIndex, + creator: creator.publicKey, + vaultIndex: 0, + ephemeralSigners: 1, + transactionMessage: message, + }); + + await connection.confirmTransaction(signature1); + const signature2 = await multisig.rpc.proposalCreate({ + connection, + feePayer: creator, + multisigPda, + transactionIndex, + creator, + }); + + await connection.confirmTransaction(signature2); + + return vaultAddress; + }; + + const approveProposal = async (member: Signer) => { + const signature = await multisig.rpc.proposalApprove({ + connection, + feePayer: member, + multisigPda, + transactionIndex: BigInt(transactionIndex), + member, + }); + + await connection.confirmTransaction(signature); + }; + + const executeProposal = async () => { + const { instruction } = await multisig.instructions.vaultTransactionExecute( + { + connection, + multisigPda, + transactionIndex, + member: cvgSecond.identity().publicKey, + } + ); + const builder = new TransactionBuilder() + .add({ + instruction: ComputeBudgetProgram.setComputeUnitLimit({ + units: 1400000, + }), + signers: [], + }) + .add({ + instruction, + signers: [cvgSecond.identity()], + }); + await builder.sendAndConfirm(cvgSecond); + }; + + const measureTokenDiff = async () => { + const measure = () => + Promise.all([ + cvg.tokens().getTokenBalance({ + mintAddress: baseMintBTC.address, + mintDecimals: baseMintBTC.decimals, + owner: squadsVault, + }), + cvg.tokens().getTokenBalance({ + mintAddress: quoteMint.address, + mintDecimals: quoteMint.decimals, + owner: squadsVault, + }), + ]); + + const [{ tokenBalance: legBefore }, { tokenBalance: quoteBefore }] = + await measure(); + + return async () => { + const [{ tokenBalance: legAfter }, { tokenBalance: quoteAfter }] = + await measure(); + + return { leg: legAfter - legBefore, quote: quoteAfter - quoteBefore }; + }; + }; + + it('Settle sell proposals through vault', async () => { + const measurer = await measureTokenDiff(); + + const vaultAddress = await createProposal({ + acceptablePriceLimit: 40000, + quoteMint, + legMint: baseMintBTC, + orderDetails: { + type: 'sell', + legAmount: 2, + }, + activeWindow: 600, + settlingWindow: 600, + }); + + await approveProposal(creator); + await approveProposal(cvgSecond.identity()); + await executeProposal(); + + const { vault, rfq } = await cvg + .vaultOperator() + .findByAddress({ address: vaultAddress }); + + const { rfqResponse: response } = await cvgMaker + .rfqs() + .respond({ rfq: rfq.address, bid: { price: 40000 } }); + const { vault: updatedVault } = await cvgMaker + .vaultOperator() + .confirmAndPrepare({ rfq, vault, response }); + await cvgMaker.rfqs().prepareSettlement({ + rfq: rfq.address, + response: response.address, + legAmountToPrepare: 1, + }); + await cvgMaker.rfqs().settle({ response: response.address }); + await cvgMaker.rfqs().cleanUpResponse({ response: response.address }); + await cvgMaker.vaultOperator().withdrawTokens({ rfq, vault: updatedVault }); + + expect(await measurer()).toMatchObject({ + leg: -2, + quote: 80000 * (1 - 0.01), + }); + }); + + it('Settle buy proposals through vault', async () => { + const measurer = await measureTokenDiff(); + + const vaultAddress = await createProposal({ + acceptablePriceLimit: 5000, + quoteMint, + legMint: baseMintBTC, + orderDetails: { + type: 'buy', + quoteAmount: 75000, + }, + activeWindow: 600, + settlingWindow: 600, + }); + + await approveProposal(creator); + await approveProposal(cvgSecond.identity()); + await executeProposal(); + + const { vault, rfq } = await cvg + .vaultOperator() + .findByAddress({ address: vaultAddress }); + + const { rfqResponse: response } = await cvgMaker + .rfqs() + .respond({ rfq: rfq.address, ask: { price: 5000 } }); + const { vault: updatedVault } = await cvgMaker + .vaultOperator() + .confirmAndPrepare({ rfq, vault, response }); + await cvgMaker.rfqs().prepareSettlement({ + rfq: rfq.address, + response: response.address, + legAmountToPrepare: 1, + }); + await cvgMaker.rfqs().settle({ response: response.address }); + await cvgMaker.rfqs().cleanUpResponse({ response: response.address }); + await cvgMaker.vaultOperator().withdrawTokens({ rfq, vault: updatedVault }); + + expect(await measurer()).toMatchObject({ + leg: 15, + quote: -75000, + }); + }); +}); diff --git a/packages/js/tests/integration/vaultOperator.spec.ts b/packages/js/tests/integration/vaultOperator.spec.ts new file mode 100644 index 000000000..6e5e9ff25 --- /dev/null +++ b/packages/js/tests/integration/vaultOperator.spec.ts @@ -0,0 +1,225 @@ +import expect from 'expect'; +import { Mint } from '../../src'; +import { + applySpotQuoteFee, + createUserCvg, + fetchTokenAmount, + runInParallelWithWait, + sleep, +} from '../helpers'; +import { BASE_MINT_BTC_PK, QUOTE_MINT_PK } from '../constants'; + +describe('integration.vaultOperator', () => { + const takerCvg = createUserCvg('taker'); + const makerCvg = createUserCvg('maker'); + const executorCvg = createUserCvg('dao'); // any user actually + + let baseMintBTC: Mint; + let quoteMint: Mint; + + before(async () => { + baseMintBTC = await takerCvg + .tokens() + .findMintByAddress({ address: BASE_MINT_BTC_PK }); + quoteMint = await takerCvg + .tokens() + .findMintByAddress({ address: QUOTE_MINT_PK }); + }); + + it('sell', async () => { + const [takerBtcBefore, takerQuoteBefore] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + + const responsePrice = 52000; + const size = 2; + + const { vaultAddress } = await takerCvg.vaultOperator().create({ + acceptablePriceLimit: 50000, + legMint: baseMintBTC, + quoteMint, + orderDetails: { + type: 'sell', + legAmount: size, + }, + activeWindow: 600, + settlingWindow: 600, + }); + + const { vault, rfq } = await takerCvg + .vaultOperator() + .findByAddress({ address: vaultAddress }); + + const { rfqResponse: response } = await makerCvg + .rfqs() + .respond({ rfq: rfq.address, bid: { price: responsePrice } }); + const { vault: updatedVault } = await executorCvg + .vaultOperator() + .confirmAndPrepare({ vault, rfq, response }); + await makerCvg.rfqs().prepareSettlement({ + response: response.address, + rfq: rfq.address, + legAmountToPrepare: 1, + }); + await makerCvg.rfqs().settle({ + response: response.address, + }); + await executorCvg.rfqs().cleanUpResponse({ response: response.address }); + + await executorCvg + .vaultOperator() + .withdrawTokens({ vault: updatedVault, rfq }); + + const [takerBtcAfter, takerQuoteAfter] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + + expect(takerQuoteAfter).toBeCloseTo( + takerQuoteBefore + applySpotQuoteFee(responsePrice * size) + ); + expect(takerBtcAfter).toBeCloseTo(takerBtcBefore - size); + }); + + it('buy', async () => { + const [takerBtcBefore, takerQuoteBefore] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + + const responsePrice = 40000; + const quoteSize = 80000; + + const { vaultAddress } = await takerCvg.vaultOperator().create({ + acceptablePriceLimit: 40000, + legMint: baseMintBTC, + quoteMint, + orderDetails: { + type: 'buy', + quoteAmount: quoteSize, + }, + activeWindow: 600, + settlingWindow: 600, + }); + + const { vault, rfq } = await takerCvg + .vaultOperator() + .findByAddress({ address: vaultAddress }); + + const { rfqResponse: response } = await makerCvg + .rfqs() + .respond({ rfq: rfq.address, ask: { price: responsePrice } }); + const { vault: updatedVault } = await executorCvg + .vaultOperator() + .confirmAndPrepare({ vault, rfq, response }); + await makerCvg.rfqs().prepareSettlement({ + response: response.address, + rfq: rfq.address, + legAmountToPrepare: 1, + }); + await executorCvg.rfqs().settle({ + response: response.address, + }); + await executorCvg.rfqs().cleanUpResponse({ response: response.address }); + + await executorCvg + .vaultOperator() + .withdrawTokens({ vault: updatedVault, rfq }); + + const [takerBtcAfter, takerQuoteAfter] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + + expect(takerQuoteAfter).toBeCloseTo(takerQuoteBefore - quoteSize); + expect(takerBtcAfter).toBeCloseTo( + takerBtcBefore + quoteSize / responsePrice + ); + }); + + it('maker defaults', async () => { + const [takerBtcBefore, takerQuoteBefore] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + + const { vaultAddress } = await takerCvg.vaultOperator().create({ + acceptablePriceLimit: 40000, + legMint: baseMintBTC, + quoteMint, + orderDetails: { + type: 'buy', + quoteAmount: 80000, + }, + activeWindow: 2, + settlingWindow: 1, + }); + + const { vault, rfq } = await takerCvg + .vaultOperator() + .findByAddress({ address: vaultAddress }); + + const [response, updatedVault] = await runInParallelWithWait(async () => { + const { rfqResponse: response } = await makerCvg + .rfqs() + .respond({ rfq: rfq.address, ask: { price: 40000 } }); + const { vault: updatedVault } = await executorCvg + .vaultOperator() + .confirmAndPrepare({ vault, rfq, response }); + + return [response, updatedVault]; + }, 3.5); + + await executorCvg.rfqs().revertSettlementPreparation({ + response: response.address, + side: 'taker', + }); + await executorCvg.rfqs().cleanUpResponse({ response: response.address }); + + await executorCvg + .vaultOperator() + .withdrawTokens({ vault: updatedVault, rfq }); + + const [takerBtcAfter, takerQuoteAfter] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + expect(takerQuoteAfter).toBeCloseTo(takerQuoteBefore); + expect(takerBtcAfter).toBeCloseTo(takerBtcBefore); + }); + + it('no response', async () => { + const [takerBtcBefore, takerQuoteBefore] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + + const { vaultAddress } = await takerCvg.vaultOperator().create({ + acceptablePriceLimit: 40000, + legMint: baseMintBTC, + quoteMint, + orderDetails: { + type: 'buy', + quoteAmount: 80000, + }, + activeWindow: 1, + settlingWindow: 600, + }); + + const { vault, rfq } = await takerCvg + .vaultOperator() + .findByAddress({ address: vaultAddress }); + + await sleep(1.5); + + await executorCvg.vaultOperator().withdrawTokens({ vault, rfq }); + + const [takerBtcAfter, takerQuoteAfter] = await Promise.all([ + fetchTokenAmount(takerCvg, baseMintBTC.address), + fetchTokenAmount(takerCvg, quoteMint.address), + ]); + expect(takerQuoteAfter).toBeCloseTo(takerQuoteBefore); + expect(takerBtcAfter).toBeCloseTo(takerBtcBefore); + }); +}); diff --git a/packages/js/tests/unit/hxro.spec.ts b/packages/js/tests/unit/hxro.spec.ts new file mode 100644 index 000000000..810f26dae --- /dev/null +++ b/packages/js/tests/unit/hxro.spec.ts @@ -0,0 +1,214 @@ +import { expect } from 'expect'; + +import { Keypair } from '@solana/web3.js'; +import { createUserCvg, ensureHxroOperatorTRGInitialized } from '../helpers'; +import { + HxroPrintTrade, + HxroLeg, + PublicKey, + HxroAdditionalRespondData, +} from '../../src'; +import { CTX } from '../constants'; + +describe('unit.hxro', () => { + const cvgTaker = createUserCvg('taker'); + const cvgMaker = createUserCvg('maker'); + const cvgAuthority = createUserCvg('dao'); + + before(async () => { + await ensureHxroOperatorTRGInitialized(cvgAuthority); + }); + + it('get hxro config', async () => { + const result = await cvgTaker.hxro().fetchConfig(); + expect(result).toEqual({ + model: 'hxroPrintTradeProviderConfig', + address: cvgTaker.hxro().pdas().config(), + validMpg: new PublicKey('GCXr6LDZurWK8Hkm18gZzJ7jUgvrYEVFFeWUR346fd42'), + }); + }); + + it('get hxro products', async () => { + const results = await cvgTaker.hxro().fetchProducts(); + + expect(results).toEqual([ + { + productIndex: 0, + productAddress: new PublicKey( + '3fw72yL2pG7cKmPs4TYJa6C9496NyypFpj5UQVLe515j' + ), + baseAssetIndex: 1, + instrumentType: 'perp-future', + productName: 'product 0', + }, + { + productIndex: 1, + productAddress: new PublicKey( + '8qBD1ZewtfoxNAy3E45f5fRtwQUhLku55cVVxT5cMPef' + ), + baseAssetIndex: 1, + instrumentType: 'perp-future', + productName: 'product 1', + }, + ]); + }); + + it('can modify hxro config', async () => { + const randomKey = new Keypair().publicKey; + const { validMpg: oldMpg } = await cvgAuthority.hxro().fetchConfig(); + await cvgAuthority.hxro().modifyConfig({ validMpg: randomKey }); + const { validMpg } = await cvgAuthority.hxro().fetchConfig(); + expect(validMpg).toEqual(randomKey); + + // set back + await cvgAuthority.hxro().modifyConfig({ validMpg: oldMpg }); + }); + + it('can overwrite print trade with whole product data', async () => { + const products = await cvgTaker.hxro().fetchProducts(); + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: new HxroPrintTrade(cvgTaker, CTX.hxroTakerTrg, [ + { amount: 1, side: 'long', productInfo: products[0] }, + ]), + orderType: 'buy', + fixedSize: { type: 'open' }, + activeWindow: 1000, + settlingWindow: 5000, + }); + + expect( + (rfq.legs[0] as HxroLeg).legInfo.productInfo.productAddress + ).toBeUndefined(); + (rfq.printTrade as HxroPrintTrade).overwriteWithFullHxroProductData( + products + ); + expect( + (rfq.legs[0] as HxroLeg).legInfo.productInfo.productAddress + ).toBeDefined(); + }); + + it('revert preparation by the same cvg party automatically removes a lock', async () => { + const products = await cvgTaker.hxro().fetchProducts(); + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: new HxroPrintTrade(cvgTaker, CTX.hxroTakerTrg, [ + { amount: 1, side: 'long', productInfo: products[0] }, + ]), + orderType: 'buy', + fixedSize: { type: 'fixed-base', amount: 100 }, + activeWindow: 3600, + settlingWindow: 3600, + }); + + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + await cvgTaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + await cvgTaker.hxro().unlockCollateralByRecord({ + lockRecord: cvgTaker + .hxro() + .pdas() + .lockedCollateralRecord( + cvgTaker.identity().publicKey, + rfqResponse.address + ), + action: 'unlock', + }); + await cvgMaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + await cvgMaker.rfqs().settle({ + response: rfqResponse.address, + }); + + await cvgMaker.rfqs().revertSettlementPreparation({ + response: rfqResponse.address, + side: 'maker', + }); + + const lockAddress = cvgMaker + .hxro() + .pdas() + .lockedCollateralRecord( + cvgMaker.identity().publicKey, + rfqResponse.address + ); + const lockData = await cvgMaker.connection.getAccountInfo(lockAddress); + expect(lockData).toBeNull(); + }); + + it('can fetch an unused lock', async () => { + const products = await cvgTaker.hxro().fetchProducts(); + const { rfq } = await cvgTaker.rfqs().createPrintTrade({ + printTrade: new HxroPrintTrade(cvgTaker, CTX.hxroTakerTrg, [ + { amount: 1, side: 'long', productInfo: products[0] }, + ]), + orderType: 'buy', + fixedSize: { type: 'fixed-base', amount: 100 }, + activeWindow: 3600, + settlingWindow: 3600, + }); + + const { rfqResponse } = await cvgMaker.rfqs().respond({ + rfq: rfq.address, + ask: { price: 100 }, + additionalData: new HxroAdditionalRespondData(CTX.hxroMakerTrg), + }); + await cvgTaker.rfqs().confirmResponse({ + response: rfqResponse.address, + rfq: rfq.address, + side: 'ask', + }); + + await cvgTaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + await cvgTaker.hxro().unlockCollateralByRecord({ + lockRecord: cvgTaker + .hxro() + .pdas() + .lockedCollateralRecord( + cvgTaker.identity().publicKey, + rfqResponse.address + ), + action: 'unlock', + }); + await cvgMaker.rfqs().preparePrintTradeSettlement({ + rfq: rfq.address, + response: rfqResponse.address, + }); + await cvgMaker.rfqs().settle({ + response: rfqResponse.address, + }); + + await cvgMaker.rfqs().revertSettlementPreparation({ + response: rfqResponse.address, + side: 'taker', + }); + + const lockKeys = ( + await cvgTaker.hxro().fetchUnusedCollateralLockRecords() + ).map((lock) => lock.publicKey); + const expectedKey = cvgTaker + .hxro() + .pdas() + .lockedCollateralRecord( + cvgTaker.identity().publicKey, + rfqResponse.address + ); + + expect(lockKeys.find((key) => key.equals(expectedKey))).toBeTruthy(); + }); +}); diff --git a/packages/js/tests/unit/protocol.spec.ts b/packages/js/tests/unit/protocol.spec.ts index d0c8e7fd7..b06cb895f 100644 --- a/packages/js/tests/unit/protocol.spec.ts +++ b/packages/js/tests/unit/protocol.spec.ts @@ -4,6 +4,8 @@ import { protocolCache, baseAssetsCache, registeredMintsCache, + BaseAsset, + Mint, } from '../../src'; import { createUserCvg, generateTicker } from '../helpers'; import { @@ -14,6 +16,7 @@ import { describe('unit.protocol', () => { const cvg = createUserCvg('dao'); + const userCvg = createUserCvg('taker'); it('get', async () => { const protocol = await cvg.protocol().get(); @@ -74,7 +77,7 @@ describe('unit.protocol', () => { canBeUsedAsQuote: true, validateDataAccountAmount: 1, prepareToSettleAccountAmount: 7, - settleAccountAmount: 3, + settleAccountAmount: 5, revertPreparationAccountAmount: 3, cleanUpAccountAmount: 4, }); @@ -111,68 +114,83 @@ describe('unit.protocol', () => { expect(response).toHaveProperty('signature'); }); + it('add print trade provider [hxro]', async () => { + const { response } = await cvg.protocol().addPrintTradeProvider({ + printTradeProviderProgram: cvg.programs().getHxroPrintTradeProvider() + .address, + settlementCanExpire: false, + validateResponseAccountAmount: 2, + }); + expect(response).toHaveProperty('signature'); + }); + it('add base asset [switchboard oracle]', async () => { - const baseAssets = await cvg.protocol().getBaseAssets(); const { response } = await cvg.protocol().addBaseAsset({ authority: cvg.identity(), - index: baseAssets.length + 1, ticker: generateTicker(), riskCategory: 'very-low', - priceOracle: { - source: 'switchboard', - address: SWITCHBOARD_BTC_ORACLE_PK, - }, + oracleSource: 'switchboard', + switchboardOracle: SWITCHBOARD_BTC_ORACLE_PK, }); expect(response).toHaveProperty('signature'); }); it('add base asset [pyth oracle]', async () => { - const baseAssets = await cvg.protocol().getBaseAssets(); const { response } = await cvg.protocol().addBaseAsset({ authority: cvg.identity(), - index: baseAssets.length + 1, ticker: generateTicker(), riskCategory: 'very-low', - priceOracle: { - source: 'pyth', - address: PYTH_SOL_ORACLE_PK, - }, + oracleSource: 'pyth', + pythOracle: PYTH_SOL_ORACLE_PK, }); expect(response).toHaveProperty('signature'); }); it('add base asset [in-place price]', async () => { - let baseAssets = await cvg.protocol().getBaseAssets(); - const index = baseAssets.length + 1; const price = 101; - const { response } = await cvg.protocol().addBaseAsset({ + const { response, baseAssetIndex } = await cvg.protocol().addBaseAsset({ authority: cvg.identity(), - index, ticker: generateTicker(), riskCategory: 'very-low', - priceOracle: { - source: 'in-place', - price, - }, + oracleSource: 'in-place', + inPlacePrice: price, }); expect(response).toHaveProperty('signature'); - const baseAssetPda = cvg.protocol().pdas().baseAsset({ index }); - baseAssets = await cvg.protocol().getBaseAssets(); - expect(baseAssets[baseAssets.length - 1].address.toBase58()).toBe( - baseAssetPda.toBase58() - ); - + const baseAssetPda = cvg + .protocol() + .pdas() + .baseAsset({ index: baseAssetIndex }); const baseAsset = await cvg .protocol() .findBaseAssetByAddress({ address: baseAssetPda }); - expect(baseAsset.priceOracle.price).toEqual(price); + expect(baseAsset.inPlacePrice).toEqual(price); + }); + + it('change base asset parameters', async () => { + const baseAssets: BaseAsset[] = await cvg.protocol().getBaseAssets(); + const baseAsset = baseAssets[0]; + const { response } = await cvg.protocol().changeBaseAssetParameters({ + index: 0, + enabled: true, + inPlacePrice: 42, + strict: false, + }); + expect(response).toHaveProperty('signature'); + + const dataAfter = await cvg + .protocol() + .findBaseAssetByAddress({ address: baseAsset.address }); + expect(dataAfter?.inPlacePrice).toBe(42); + expect(dataAfter?.strict).toBe(false); }); it('register mint', async () => { + const baseAssets: BaseAsset[] = await cvg.protocol().getBaseAssets(); + const baseAssetIndex = baseAssets[0].index; const { mint } = await cvg.tokens().createMint({ decimals: 3 }); const { response } = await cvg.protocol().registerMint({ - baseAssetIndex: 1, + baseAssetIndex, mint: mint.address, }); expect(response).toHaveProperty('signature'); @@ -189,4 +207,27 @@ describe('unit.protocol', () => { }); expect(baseAsset).toHaveProperty('address'); }); + + it('add user asset', async () => { + const { mint } = await cvg.tokens().createMint(); + const ticker = generateTicker(); + const { baseAssetIndex } = await cvg + .protocol() + .addUserAsset({ ticker, mint: mint.address }); + const address = cvg.protocol().pdas().baseAsset({ index: baseAssetIndex }); + const baseAsset: BaseAsset = await cvg + .protocol() + .findBaseAssetByAddress({ address }); + expect(baseAsset.ticker).toBe(ticker); + }); + + it('add several user assets', async () => { + const mintResults = await Promise.all( + new Array(5).fill(null).map(() => cvg.tokens().createMint()) + ); + for (const { mint } of mintResults) { + const ticker = generateTicker(); + await cvg.protocol().addUserAsset({ ticker, mint: mint.address }); + } + }); }); diff --git a/packages/js/tests/unit/response.spec.ts b/packages/js/tests/unit/response.spec.ts index adbda7e88..dc991132c 100644 --- a/packages/js/tests/unit/response.spec.ts +++ b/packages/js/tests/unit/response.spec.ts @@ -168,10 +168,6 @@ describe('unit.response', () => { address: rfq2.address, }); - await makerCvg.rfqs().unlockResponsesCollateral({ - responses: responsesBefore.map((r) => r.address), - }); - const responsesAfter = await makerCvg.rfqs().findResponsesByRfq({ address: rfq2.address, }); @@ -184,7 +180,6 @@ describe('unit.response', () => { }); await makerCvg.rfqs().cleanUpResponse({ response: responses[0].address, - maker: makerCvg.identity().publicKey, }); }); @@ -227,7 +222,7 @@ describe('unit.response', () => { }); it('Cannot confirm Response if response is expired', async () => { - const rfq = await createRfq(takerCvg, amount0, 'buy', 10); + const rfq = await createRfq(takerCvg, amount0, 'buy', [], 10); const res = await respondToRfq( makerCvg, @@ -237,7 +232,7 @@ describe('unit.response', () => { convertTimestampToSeconds(Date.now()) + 2 ); - await sleep(2); + await sleep(3); await expectError( takerCvg.rfqs().confirmResponse({ @@ -248,13 +243,8 @@ describe('unit.response', () => { 'Response is expired' ); - await makerCvg.rfqs().unlockResponseCollateral({ - response: res.rfqResponse.address, - }); - await makerCvg.rfqs().cleanUpResponse({ response: res.rfqResponse.address, - maker: makerCvg.identity().publicKey, }); }); }); diff --git a/packages/js/tests/unit/responseStateAndAction.spec.ts b/packages/js/tests/unit/responseStateAndAction.spec.ts index a91c00497..5c48d4f7d 100644 --- a/packages/js/tests/unit/responseStateAndAction.spec.ts +++ b/packages/js/tests/unit/responseStateAndAction.spec.ts @@ -72,22 +72,6 @@ describe('unit.responseStateAndAction', () => { }).responseState ).toBe('Cancelled'); - //Unlock Response Collateral for maker - refreshedResponse = await makerCvg.rfqs().findResponseByAddress({ - address: rfqResponse.address, - }); - expect( - takerCvg.rfqs().getResponseStateAndAction({ - response: refreshedResponse, - rfq, - caller: 'maker', - responseSide: 'bid', - }).responseAction - ).toBe('UnlockCollateral'); - await makerCvg.rfqs().unlockResponseCollateral({ - response: refreshedResponse.address, - }); - //Cleanup for maker refreshedResponse = await makerCvg.rfqs().findResponseByAddress({ address: rfqResponse.address, @@ -103,7 +87,6 @@ describe('unit.responseStateAndAction', () => { await makerCvg.rfqs().cleanUpResponse({ response: rfqResponse.address, - maker: makerCvg.identity().publicKey, }); }); @@ -182,9 +165,6 @@ describe('unit.responseStateAndAction', () => { await takerCvg.rfqs().settle({ response: rfqResponse.address, - rfq: rfq.address, - maker: makerCvg.identity().publicKey, - taker: takerCvg.identity().publicKey, }); //Settled for maker diff --git a/packages/js/tests/unit/rfq.spec.ts b/packages/js/tests/unit/rfq.spec.ts index 9fd4b571f..1cefa9df7 100644 --- a/packages/js/tests/unit/rfq.spec.ts +++ b/packages/js/tests/unit/rfq.spec.ts @@ -62,7 +62,8 @@ describe('unit.rfq', () => { const rfqs = (await getAll(iterator)).flat().filter((rfq: any) => { return ( takerCvg.rfqs().getRfqStateAndAction({ rfq, caller: 'taker' }) - .rfqAction === 'Cancel' + .rfqAction === 'Cancel' && + rfq.taker.equals(takerCvg.identity().publicKey) ); }); expect(rfqs.length).toBeGreaterThan(0); @@ -72,36 +73,13 @@ describe('unit.rfq', () => { expect(responses.length).toBe(rfqs.length); }); - it('unlock', async () => { - const iterator: any = takerCvg.rfqs().findRfqs({}); - const rfqsBefore = (await getAll(iterator)).flat().filter((rfq: any) => { - return ( - takerCvg.rfqs().getRfqStateAndAction({ rfq, caller: 'taker' }) - .rfqAction === 'UnlockCollateral' - ); - }); - expect(rfqsBefore.length).toBeGreaterThan(0); - const { responses } = await takerCvg.rfqs().unlockRfqsCollateral({ - rfqs: rfqsBefore.map((rfq: any) => rfq.address), - }); - expect(responses.length).toBe(rfqsBefore.length); - const rfqsAfter = (await getAll(iterator)).flat().filter((rfq: any) => { - return ( - takerCvg.rfqs().getRfqStateAndAction({ rfq, caller: 'taker' }) - .rfqAction === 'Cleanup' - ); - }); - rfqsAfter.map((rfq: any) => { - expect(rfq.totalTakerCollateralLocked).toBe(0); - }); - }); - it('clean up', async () => { const iterator: any = takerCvg.rfqs().findRfqs({}); const rfqs = (await getAll(iterator)).flat().filter((rfq: any) => { return ( takerCvg.rfqs().getRfqStateAndAction({ rfq, caller: 'taker' }) - .rfqAction === 'Cleanup' + .rfqAction === 'Cleanup' && + rfq.taker.equals(takerCvg.identity().publicKey) ); }); expect(rfqs.length).toBeGreaterThan(0); diff --git a/packages/js/tests/unit/rfqStateAndAction.spec.ts b/packages/js/tests/unit/rfqStateAndAction.spec.ts index a65806413..872179695 100644 --- a/packages/js/tests/unit/rfqStateAndAction.spec.ts +++ b/packages/js/tests/unit/rfqStateAndAction.spec.ts @@ -61,29 +61,6 @@ describe('unit.rfqStateAndAction', () => { address: rfq.address, }); - //UnlockCollateral for taker - expect( - takerCvg.rfqs().getRfqStateAndAction({ - rfq: refreshedRfq, - caller: 'taker', - }).rfqAction - ).toBe('UnlockCollateral'); - - //null for maker - expect( - takerCvg.rfqs().getRfqStateAndAction({ - rfq: refreshedRfq, - caller: 'maker', - }).rfqAction - ).toBe(null); - - await takerCvg.rfqs().unlockRfqCollateral({ - rfq: rfq.address, - }); - refreshedRfq = await makerCvg.rfqs().findRfqByAddress({ - address: rfq.address, - }); - //Cleanup for taker expect( takerCvg.rfqs().getRfqStateAndAction({ @@ -169,34 +146,10 @@ describe('unit.rfqStateAndAction', () => { await sleep(4); - //UnlockCollateral for taker - expect( - takerCvg.rfqs().getRfqStateAndAction({ - rfq, - caller: 'taker', - }).rfqAction - ).toBe('UnlockCollateral'); - - //null for maker - expect( - takerCvg.rfqs().getRfqStateAndAction({ - rfq, - caller: 'maker', - }).rfqAction - ).toBe(null); - - await takerCvg.rfqs().unlockRfqCollateral({ - rfq: rfq.address, - }); - - const refreshedRfq = await makerCvg.rfqs().findRfqByAddress({ - address: rfq.address, - }); - //Cleanup for taker expect( takerCvg.rfqs().getRfqStateAndAction({ - rfq: refreshedRfq, + rfq, caller: 'taker', }).rfqAction ).toBe('Cleanup'); diff --git a/packages/js/tests/unit/riskEngine.spec.ts b/packages/js/tests/unit/riskEngine.spec.ts index 752627106..6d5f88cba 100644 --- a/packages/js/tests/unit/riskEngine.spec.ts +++ b/packages/js/tests/unit/riskEngine.spec.ts @@ -1,6 +1,5 @@ import { expect } from 'expect'; -import { InstrumentType, DEFAULT_RISK_CATEGORIES_INFO } from '../../src'; import { createCFlyRfq, createRfq, @@ -13,119 +12,12 @@ describe('unit.riskEngine', () => { const takerCvg = createUserCvg('taker'); const makerCvg = createUserCvg('maker'); - it('fetch config', async () => { - const config = await daoCvg.riskEngine().fetchConfig(); - expect(config).toHaveProperty('address'); - }); - - it('update config', async () => { - const { config } = await daoCvg.riskEngine().updateConfig(); - expect(config).toHaveProperty('address'); - }); - - it('close config', async () => { - const { response } = await daoCvg.riskEngine().closeConfig(); - expect(response).toHaveProperty('signature'); - }); - - it('initialize config', async () => { - const { response } = await daoCvg.riskEngine().initializeConfig(); - expect(response).toHaveProperty('signature'); - }); - - it('set instrument type [spot]', async () => { - const { config } = await daoCvg.riskEngine().setInstrumentType({ - instrumentType: InstrumentType.Spot, - instrumentProgram: daoCvg.programs().getSpotInstrument().address, - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - - it('set instrument type [american]', async () => { - const { config } = await daoCvg.riskEngine().setInstrumentType({ - instrumentType: InstrumentType.Option, - instrumentProgram: daoCvg.programs().getPsyoptionsAmericanInstrument() - .address, - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - - it('set instrument type [european]', async () => { - const { config } = await daoCvg.riskEngine().setInstrumentType({ - instrumentType: InstrumentType.Option, - instrumentProgram: daoCvg.programs().getPsyoptionsEuropeanInstrument() - .address, - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - - it('set risk categories info [very low]', async () => { - const { config } = await daoCvg.riskEngine().setRiskCategoriesInfo({ - changes: [ - { - value: DEFAULT_RISK_CATEGORIES_INFO.veryLow, - category: 'very-low', - }, - ], - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - - it('set risk categories info [low]', async () => { - const { config } = await daoCvg.riskEngine().setRiskCategoriesInfo({ - changes: [ - { - value: DEFAULT_RISK_CATEGORIES_INFO.low, - category: 'low', - }, - ], - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - - it('set risk categories info [medium]', async () => { - const { config } = await daoCvg.riskEngine().setRiskCategoriesInfo({ - changes: [ - { - value: DEFAULT_RISK_CATEGORIES_INFO.medium, - category: 'medium', - }, - ], - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - - it('set risk categories info [high]', async () => { - const { config } = await daoCvg.riskEngine().setRiskCategoriesInfo({ - changes: [ - { - value: DEFAULT_RISK_CATEGORIES_INFO.high, - category: 'high', - }, - ], - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - - it('set risk categories info [very high]', async () => { - const { config } = await daoCvg.riskEngine().setRiskCategoriesInfo({ - changes: [ - { - value: DEFAULT_RISK_CATEGORIES_INFO.veryHigh, - category: 'very-high', - }, - ], - }); - expect(config.address).toEqual(daoCvg.riskEngine().pdas().config()); - }); - it('calculate collateral for RFQ', async () => { const { rfq } = await createRfq(takerCvg, 1.5, 'buy'); const { requiredCollateral } = await daoCvg .riskEngine() .calculateCollateralForRfq({ legs: rfq.legs, - quoteAsset: rfq.quoteAsset, settlementPeriod: rfq.settlingWindow, size: rfq.size, orderType: rfq.orderType, @@ -166,7 +58,6 @@ describe('unit.riskEngine', () => { .riskEngine() .calculateCollateralForRfq({ legs: rfq.legs, - quoteAsset: rfq.quoteAsset, settlementPeriod: rfq.settlingWindow, size: rfq.size, orderType: rfq.orderType, @@ -180,7 +71,6 @@ describe('unit.riskEngine', () => { .riskEngine() .calculateCollateralForRfq({ legs: rfq.legs, - quoteAsset: rfq.quoteAsset, settlementPeriod: rfq.settlingWindow, size: rfq.size, orderType: rfq.orderType, diff --git a/packages/js/tests/unit/vaultOperator.spec.ts b/packages/js/tests/unit/vaultOperator.spec.ts new file mode 100644 index 000000000..b013665d4 --- /dev/null +++ b/packages/js/tests/unit/vaultOperator.spec.ts @@ -0,0 +1,86 @@ +import { expect } from 'expect'; +import { EscrowRfq, Mint, VaultParameters } from '../../src'; +import { createUserCvg } from '../helpers'; +import { BASE_MINT_BTC_PK, QUOTE_MINT_PK } from '../constants'; + +describe('unit.vaultOperator', () => { + const takerCvg = createUserCvg('taker'); + const makerCvg = createUserCvg('maker'); + + let baseMintBTC: Mint; + let quoteMint: Mint; + + before(async () => { + baseMintBTC = await takerCvg + .tokens() + .findMintByAddress({ address: BASE_MINT_BTC_PK }); + quoteMint = await takerCvg + .tokens() + .findMintByAddress({ address: QUOTE_MINT_PK }); + }); + + it('can fetch single vault operator info and parameters match', async () => { + const { vaultAddress } = await takerCvg.vaultOperator().create({ + acceptablePriceLimit: 40000, + legMint: baseMintBTC, + quoteMint, + orderDetails: { + type: 'buy', + quoteAmount: 80000, + }, + activeWindow: 600, + settlingWindow: 1200, + }); + + const { vault, rfq }: { vault: VaultParameters; rfq: EscrowRfq } = + await takerCvg.vaultOperator().findByAddress({ address: vaultAddress }); + + expect(vault.acceptablePriceLimit).toEqual(40000); + expect(rfq.legs[0].getAssetMint()).toEqual(baseMintBTC.address); + expect(rfq.quoteMint).toEqual(quoteMint.address); + expect(rfq.orderType).toEqual('buy'); + expect(rfq.size).toEqual({ + type: 'fixed-quote', + amount: 80000, + }); + expect(rfq.activeWindow).toEqual(600); + expect(rfq.settlingWindow).toEqual(1200); + }); + + it('can fetch multiple vaults', async () => { + const expectedAddresses = []; + for (let i = 0; i < 3; i++) { + const { vaultAddress, rfqAddress } = await takerCvg + .vaultOperator() + .create({ + acceptablePriceLimit: 40000, + legMint: baseMintBTC, + quoteMint, + orderDetails: { + type: 'buy', + quoteAmount: 80000, + }, + activeWindow: 600, + settlingWindow: 1200, + }); + expectedAddresses.push({ vaultAddress, rfqAddress }); + } + + const sdkVaults = await takerCvg + .vaultOperator() + .find({ creator: takerCvg.identity().publicKey }); + const sdkAddresses = sdkVaults.map((r) => ({ + vaultAddress: r.vault.address, + rfqAddress: r.rfq.address, + })); + + for (const expected of expectedAddresses) { + const found = sdkAddresses.find( + (x) => + x.vaultAddress.equals(expected.vaultAddress) && + x.rfqAddress.equals(expected.rfqAddress) + ); + expect(found).not.toBeUndefined(); + } + }); +}); diff --git a/packages/js/tests/unit/whitelist.spec.ts b/packages/js/tests/unit/whitelist.spec.ts index 06a6d3593..2acc99b49 100644 --- a/packages/js/tests/unit/whitelist.spec.ts +++ b/packages/js/tests/unit/whitelist.spec.ts @@ -1,85 +1,31 @@ import { PublicKey } from '@solana/web3.js'; - import expect from 'expect'; -import { createUserCvg, expectError } from '../helpers'; -import { DAO_PK, MAKER_PK, TAKER_PK, TESTING_PK } from '../constants'; +import { createUserCvg } from '../helpers'; +import { DAO_PK, MAKER_PK, TAKER_PK } from '../constants'; describe('unit.whitelist', () => { const cvg = createUserCvg('taker'); it('Create a whitelist', async () => { await cvg.whitelist().createWhitelist({ creator: TAKER_PK, - capacity: 10, whitelist: [MAKER_PK, DAO_PK], }); }); - it('Add an address to whitelist', async () => { - const newPublickey = new PublicKey( - 'Eyv3PBdmp5PUVzrT3orDVad8roBMK8au9nKBazZXkKtA' - ); - - const { whitelist } = await cvg.whitelist().createWhitelist({ - creator: TAKER_PK, - capacity: 10, - whitelist: [MAKER_PK, DAO_PK], - }); - - await cvg.whitelist().addAddressToWhitelist({ - whitelist: whitelist.address, - addressToAdd: newPublickey, - }); - }); - - it('remove an address from whitelist', async () => { - const { whitelist } = await cvg.whitelist().createWhitelist({ - creator: TAKER_PK, - capacity: 10, - whitelist: [MAKER_PK, DAO_PK], - }); - - await cvg.whitelist().removeAddressFromWhitelist({ - whitelist: whitelist.address, - addressToRemove: DAO_PK, - }); - }); - - it('add duplicate address to whitelist more than capacity', async () => { - const { whitelist } = await cvg.whitelist().createWhitelist({ - creator: TAKER_PK, - capacity: 10, - whitelist: [MAKER_PK, DAO_PK], - }); - - await expectError( - cvg.whitelist().addAddressToWhitelist({ - whitelist: whitelist.address, - addressToAdd: DAO_PK, - }), - 'AddressAlreadyExistsOnWhitelist' - ); - }); - - it('add excess addresses to whitelist more than capacity', async () => { - const { whitelist } = await cvg.whitelist().createWhitelist({ + it('Create a whitelist with MAX Capacity = 20', async () => { + const pubkeys: PublicKey[] = []; + for (let i = 0; i < 20; i++) { + pubkeys.push(TAKER_PK); + } + await cvg.whitelist().createWhitelist({ creator: TAKER_PK, - capacity: 2, - whitelist: [MAKER_PK, DAO_PK], + whitelist: [...pubkeys], }); - - await expectError( - cvg.whitelist().addAddressToWhitelist({ - whitelist: whitelist.address, - addressToAdd: TESTING_PK, - }), - 'WhitelistMaximumCapacityReached' - ); }); it('clean up', async () => { const { whitelist } = await cvg.whitelist().createWhitelist({ creator: TAKER_PK, - capacity: 10, whitelist: [MAKER_PK, DAO_PK], }); @@ -88,11 +34,17 @@ describe('unit.whitelist', () => { }); }); - it('find whitelists by creator', async () => { - const whitelists = await cvg.whitelist().findWhitelistsByCreator({ + it('find whitelists by address', async () => { + const { + whitelist: { address }, + } = await cvg.whitelist().createWhitelist({ creator: TAKER_PK, + whitelist: [MAKER_PK, DAO_PK], + }); + const whitelist = await cvg.whitelist().findWhitelistByAddress({ + address, }); - expect(whitelists.length).toBe(7); + expect(whitelist.address).toEqual(address); }); }); diff --git a/packages/validator/dependencies/hxro/accounts/execution-output.json b/packages/validator/dependencies/hxro/accounts/execution-output.json new file mode 100644 index 000000000..e15cb5d7f --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/execution-output.json @@ -0,0 +1,13 @@ +{ + "pubkey": "6Prp1p7vjS6LCb8xR1oQqsbUPX9AWaHz9PBVbdzAFHT4", + "account": { + "lamports": 953520, + "data": [ + "UXUBZI2/164A", + "base64" + ], + "owner": "FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/fee-config.json b/packages/validator/dependencies/hxro/accounts/fee-config.json new file mode 100644 index 000000000..1e25ad1b1 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/fee-config.json @@ -0,0 +1,13 @@ +{ + "pubkey": "GBhshm4LFyYTv9iPocz7kmLpRhvvPNoxH9wgB57uNamm", + "account": { + "lamports": 946560, + "data": [ + "AAAAAAAAAAA=", + "base64" + ], + "owner": "5T9gt3frWPAvu1hxEULbsKrP2WF4ggqSxCMqpJvtWXHV", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/fee-output.json b/packages/validator/dependencies/hxro/accounts/fee-output.json new file mode 100644 index 000000000..3f52f48a7 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/fee-output.json @@ -0,0 +1,13 @@ +{ + "pubkey": "4Ucpj5hWiz8msBQVgFSUnqxQCkJWEPn5YbpwFbbhxoa6", + "account": { + "lamports": 1002240, + "data": [ + "AAAAAAAAAAAAAAAAAAAAAA==", + "base64" + ], + "owner": "5T9gt3frWPAvu1hxEULbsKrP2WF4ggqSxCMqpJvtWXHV", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/maker-fee-state.json b/packages/validator/dependencies/hxro/accounts/maker-fee-state.json new file mode 100644 index 000000000..8c9e633ba --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/maker-fee-state.json @@ -0,0 +1,13 @@ +{ + "pubkey": "FU68EKUppMq89TSVBELYpbsdw2FpzKwx79mPvCARmM9t", + "account": { + "lamports": 946560, + "data": [ + "/wAAAAAAAAA=", + "base64" + ], + "owner": "5T9gt3frWPAvu1hxEULbsKrP2WF4ggqSxCMqpJvtWXHV", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/maker-risk-state.json b/packages/validator/dependencies/hxro/accounts/maker-risk-state.json new file mode 100644 index 000000000..c0c757f63 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/maker-risk-state.json @@ -0,0 +1,13 @@ +{ + "pubkey": "EDHbf67fJZBZoKFJGPEC7b9qimnave5DiYBctVWEysYb", + "account": { + "lamports": 953520, + "data": [ + "2JJrXmhLtrEB", + "base64" + ], + "owner": "BVDTB61eHY7UnCb4ueatdaV4rctTzqfLAL6sQDeMNSHA", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/maker-trg.json b/packages/validator/dependencies/hxro/accounts/maker-trg.json new file mode 100644 index 000000000..5f057b83d --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/maker-trg.json @@ -0,0 +1,13 @@ +{ + "pubkey": "4Lrt2YtUyEB8SrtTR3Tsb1DBGU9hRU6xNuDZd9zJrKG9", + "account": { + "lamports": 93264000, + "data": [ + "eeRuOP7P9agCAAAAAAAAAOHTkilwXhTJ/6+xI4JB3v1jOjZw3u1pPBezEe5kThdfRGcv6WZ5nR0SQFCdXFvcEqmvImWuWJkw9t9ogVLKIbf//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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packages/validator/dependencies/hxro/accounts/mpg.json new file mode 100644 index 000000000..d5d7e36b8 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/mpg.json @@ -0,0 +1,13 @@ +{ + "pubkey": "GCXr6LDZurWK8Hkm18gZzJ7jUgvrYEVFFeWUR346fd42", + "account": { + "lamports": 1002852480, + "data": [ + "Fk3/hqMpOYYBAAAAAAAAAHRlc3RfZ3JvdXAgICAgICCd2BM5IMatN7QacL9qYfDUoSp7lW4gLLShlIwVOfE7tZ3YEzkgxq03tBpwv2ph8NShKnuVbiAstKGUjBU58Tu1e2UTGuRioXUH1thtTs+0Qj7hdyxRnoHwm55RQpy8WkYAAAAAAAAAAAAAAAAAAAAAndgTOSDGrTe0GnC/amHw1KEqe5VuICy0oZSMFTnxO7UJAAAAAAAAAJvPNesTwPbNbWhQ+qcuU4AT5K71Lu3NFZMJV/M1JwtVQiGr/PKqiZhPtLpVzg5Wj7/nezL4cN+vXxMYlbugfIzhnVQdeh5XYssMXY8h3Yrj9Evl6QBAtE3LvxsHspI/EEIhFffMSGTB6K2+ouGgyra89Qfui8b0wy2U0bwiXz2pAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACWAAAAAAAAAO4CAAAAAAAAyggAAAAAAAAoIwAAAAAAAAAAAAAAAAAA/wAAAAAAAAAnsJ7HAbAJhyOWng6wgS65I6Z8m5/XiXTEajroH8vLYnByb2R1Y3QgICAgICAgIDCqQV2uWEKoyM67d1nj8k6OW9/5y1qJymkTwf10rWtYKWQAAAAAAAAABAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAP////////9/AAAAAAAAAAD/////////fwAAAAAAAAAA/////////38AAAAAAAAAAP////////9/AAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAA/////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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+wD/AAEACAAAAAAAAAAAACe0x+xjNoToMGnEntp6lbrI+G8kQ3zXB+gDnP/oA5z/M6Y/ZkVsV2u0C1JA/H+eDE/RUCFSWkoDAAaIGPHlD8/TfgL6AAguhJ7Kqw4mwH8Lc5n8ysQ9R+yzRg3bXJGGDgIAAAAAAAAAAAAAAAAAAACd2BM5IMatN7QacL9qYfDUoSp7lW4gLLShlIwVOfE7tQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAA=", + "base64" + ], + "owner": "FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/product-0-orderbook.json b/packages/validator/dependencies/hxro/accounts/product-0-orderbook.json new file mode 100644 index 000000000..b6c467374 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/product-0-orderbook.json @@ -0,0 +1,13 @@ +{ + "pubkey": "CTc7swEKXFCD1gsnvVcQyozXK2zJ3roQr3fuU7G6uerC", + "account": { + "lamports": 2227200, + "data": [ + "AQAAAAAAAAAcqYy6A1iSjP3wy3cOv6ZrEgOTumirhDdQ4K7/QLUAOyGtE4dJIGYBPjoaCDKI2FCzA3XwKXWYVkRLO43DdPsRB192kPMPxijVOerYoBe4JKaoj7bMWca2a9cQQZgC2tH1QHjNnhjt4+PmLihbEBIAEg1w8r86g76alyQbT0UDRSAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAD8IQAAAAAAAQAAAAAAAAABAAAAAAAAAOgDAAAAAAAA", + "base64" + ], + "owner": "DchhQ6g8LyRCM5mnao1MAg3g9twfqBbDmUWgpQpFfn1b", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/product-0.json b/packages/validator/dependencies/hxro/accounts/product-0.json new file mode 100644 index 000000000..a439ae386 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/product-0.json @@ -0,0 +1,13 @@ +{ + "pubkey": "3fw72yL2pG7cKmPs4TYJa6C9496NyypFpj5UQVLe515j", + "account": { + "lamports": 2449920, + "data": [ + "2iV+Bk5nKRMBAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAPsAAAAAAAAAM9QAAAAAAAACAAAAAAAAAIA8dWQAAAAAgFEBAAAAAACAcAAAAAAAAO8Ni2/aLOukHaFdQJXR2jkqDS+O0MbHvA9M+sjCgLVt4dOSKXBeFMn/r7EjgkHe/WM6NnDe7Wk8F7MR7mROF1+d2BM5IMatN7QacL9qYfDUoSp7lW4gLLShlIwVOfE7tQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgDx1ZAAAAAA=", + "base64" + ], + "owner": "8981bZYszfz1FrFVx7gcUm61RfawMoAHnURuERRJKdkq", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/product-1-orderbook.json b/packages/validator/dependencies/hxro/accounts/product-1-orderbook.json new file mode 100644 index 000000000..37535a29a --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/product-1-orderbook.json @@ -0,0 +1,13 @@ +{ + "pubkey": "3q4UnqSY7ARzcbX8B647soB5Xji4Qr23idLQGpZGLzJa", + "account": { + "lamports": 2227200, + "data": [ + "AQAAAAAAAAAqISmMdoAJaCx8HkO5xjNJW4Dqhq7wvw7C/zMdSp1BKSvPsRm6t+ZQfVcpMdTDwQtk4Zamrgk1d/lUI78uAz8f0id22k7YqBKMg7Gi65pFk8QC3IRbMJwgHEgYEMWlql/RuFuAeWjKnshatotZZbvqvvWuZRELzUhKRmHw68odHSAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAD8IQAAAAAAAQAAAAAAAAABAAAAAAAAAOgDAAAAAAAA", + "base64" + ], + "owner": "DchhQ6g8LyRCM5mnao1MAg3g9twfqBbDmUWgpQpFfn1b", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/product-1.json b/packages/validator/dependencies/hxro/accounts/product-1.json new file mode 100644 index 000000000..67034e093 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/product-1.json @@ -0,0 +1,13 @@ +{ + "pubkey": "8qBD1ZewtfoxNAy3E45f5fRtwQUhLku55cVVxT5cMPef", + "account": { + "lamports": 2449920, + "data": [ + "2iV+Bk5nKRMBAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAPwAAAAAAAAA6d0BAAAAAAAEAAAAAAAAAMBJeGQAAAAAgFEBAAAAAACAcAAAAAAAAO8Ni2/aLOukHaFdQJXR2jkqDS+O0MbHvA9M+sjCgLVt4dOSKXBeFMn/r7EjgkHe/WM6NnDe7Wk8F7MR7mROF1+d2BM5IMatN7QacL9qYfDUoSp7lW4gLLShlIwVOfE7tQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwEl4ZAAAAAA=", + "base64" + ], + "owner": "8981bZYszfz1FrFVx7gcUm61RfawMoAHnURuERRJKdkq", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/risk-output.json b/packages/validator/dependencies/hxro/accounts/risk-output.json new file mode 100644 index 000000000..d28717e46 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/risk-output.json @@ -0,0 +1,13 @@ +{ + "pubkey": "FEaUEZkFnyTfkWm8GgYR7sbyMkoW5nYSyqECDmKfQQoo", + "account": { + "lamports": 3897600, + "data": [ + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "base64" + ], + "owner": "BVDTB61eHY7UnCb4ueatdaV4rctTzqfLAL6sQDeMNSHA", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/taker-fee-state.json b/packages/validator/dependencies/hxro/accounts/taker-fee-state.json new file mode 100644 index 000000000..1f9580753 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/taker-fee-state.json @@ -0,0 +1,13 @@ +{ + "pubkey": "12fr3WXr7Mh1wGMPQe1qe5VUeexz1BRzJ6SfAhHPgC1b", + "account": { + "lamports": 946560, + "data": [ + "/wAAAAAAAAA=", + "base64" + ], + "owner": "5T9gt3frWPAvu1hxEULbsKrP2WF4ggqSxCMqpJvtWXHV", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/taker-risk-state.json b/packages/validator/dependencies/hxro/accounts/taker-risk-state.json new file mode 100644 index 000000000..5135e9a7f --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/taker-risk-state.json @@ -0,0 +1,13 @@ +{ + "pubkey": "78haJHMHdjdp6phofBzQwbHdNobFyYDrGRdgfAWQfwxL", + "account": { + "lamports": 953520, + "data": [ + "2JJrXmhLtrEB", + "base64" + ], + "owner": "BVDTB61eHY7UnCb4ueatdaV4rctTzqfLAL6sQDeMNSHA", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/taker-trg.json b/packages/validator/dependencies/hxro/accounts/taker-trg.json new file mode 100644 index 000000000..0641af8b3 --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/taker-trg.json @@ -0,0 +1,13 @@ +{ + "pubkey": "A3tmPza8B4rvHFiUkPHLsL7Nnv4ERK8utFfwPa1yAn18", + "account": { + "lamports": 93264000, + "data": [ + "eeRuOP7P9agCAAAAAAAAAOHTkilwXhTJ/6+xI4JB3v1jOjZw3u1pPBezEe5kThdfyxkDb26bL0vjVHOsyuI/i4PC7QTivY42lYqpvanXNlf//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "base64" + ], + "owner": "FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/accounts/vault.json b/packages/validator/dependencies/hxro/accounts/vault.json new file mode 100644 index 000000000..f1fe0214e --- /dev/null +++ b/packages/validator/dependencies/hxro/accounts/vault.json @@ -0,0 +1,13 @@ +{ + "pubkey": "G6b2JSF5M7SySosNC4GkHHmqXczSCGUycppRiYvTQ7aK", + "account": { + "lamports": 2039280, + "data": [ + "e2UTGuRioXUH1thtTs+0Qj7hdyxRnoHwm55RQpy8WkbgTa1eL6Zbjxal5nIpE/kYcpnP9RQiZgx7paDu540f/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "base64" + ], + "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/dex.json b/packages/validator/dependencies/hxro/dex.json new file mode 100644 index 000000000..e50bf8d58 --- /dev/null +++ b/packages/validator/dependencies/hxro/dex.json @@ -0,0 +1,4605 @@ +{ + "version": "0.1.0", + "name": "dex", + "constants": [ + { + "name": "NAME_LEN", + "type": "u64", + "value": "16" + }, + { + "name": "MAX_OUTRIGHTS", + "type": "u64", + "value": "128" + }, + { + "name": "MAX_PRODUCTS", + "type": "u64", + "value": "256" + }, + { + "name": "HEALTH_BUFFER_LEN", + "type": "u64", + "value": "32" + }, + { + "name": "MAX_TRADER_POSITIONS", + "type": "u64", + "value": "16" + }, + { + "name": "MAX_OPEN_ORDERS_PER_POSITION", + "type": "u64", + "value": "256" + }, + { + "name": "MAX_OPEN_ORDERS", + "type": "u64", + "value": "1024" + }, + { + "name": "ANCHOR_DISCRIMINANT_LEN", + "type": "u64", + "value": "8" + }, + { + "name": "SENTINEL", + "type": "u64", + "value": "0" + }, + { + "name": "CALLBACK_INFO_LEN", + "type": "u64", + "value": "std :: mem :: size_of :: < CallBackInfo > () as u64" + }, + { + "name": "CALLBACK_ID_LEN", + "type": "u64", + "value": "32" + }, + { + "name": "MAX_COMBOS", + "type": "u64", + "value": "128" + }, + { + "name": "MAX_LEGS", + "type": "u64", + "value": "4" + }, + { + "name": "SLOTS_1_MIN", + "type": "u64", + "value": "150" + }, + { + "name": "SLOTS_5_MIN", + "type": "u64", + "value": "750" + }, + { + "name": "SLOTS_15_MIN", + "type": "u64", + "value": "2250" + }, + { + "name": "SLOTS_60_MIN", + "type": "u64", + "value": "9000" + } + ], + "instructions": [ + { + "name": "initializeMarketProductGroup", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "vaultMint", + "isMut": false, + "isSigner": false + }, + { + "name": "feeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "sysvarRent", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": false, + "isSigner": false + }, + { + "name": "stakingFeeCollector", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializeMarketProductGroupParams" + } + } + ] + }, + { + "name": "updateMarketProductGroup", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": false, + "isSigner": false + }, + { + "name": "feeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "stakingFeeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "UpdateMarketProductGroupParams" + } + } + ] + }, + { + "name": "setAddressLookupTable", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "addressLookupTable", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "initializeMarketProduct", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializeMarketProductParams" + } + } + ] + }, + { + "name": "changeOrderbook", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "oldOrderbook", + "isMut": false, + "isSigner": false + }, + { + "name": "oldEventQueue", + "isMut": false, + "isSigner": false + }, + { + "name": "oldBids", + "isMut": false, + "isSigner": false + }, + { + "name": "oldAsks", + "isMut": false, + "isSigner": false + }, + { + "name": "newOrderbook", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "deactivateMarketProduct", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "removeMarketProduct", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "removeMarketProductGroup", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "lockCollateral", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "feeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskStateAcct", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LockCollateralParams" + } + } + ] + }, + { + "name": "unlockCollateral", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "feeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskStateAcct", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LockCollateralParams" + } + } + ] + }, + { + "name": "initializePrintTrade", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": false, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": false, + "isSigner": false + }, + { + "name": "operator", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "operatorOwner", + "isMut": false, + "isSigner": true + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializePrintTradeParams" + } + } + ] + }, + { + "name": "initializePrintTradeExecutionOutput", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "executionOutput", + "isMut": true, + "isSigner": true + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "signPrintTrade", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": true, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": true, + "isSigner": false + }, + { + "name": "operator", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "creatorTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "creatorTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SignPrintTradeParams" + } + } + ] + }, + { + "name": "executePrintTrade", + "accounts": [ + { + "name": "op", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": true, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": true, + "isSigner": false + }, + { + "name": "operator", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "creatorTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "creatorTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "counterpartyTraderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + }, + { + "name": "executionOutput", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "cancelPrintTrade", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": false, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": false, + "isSigner": false + }, + { + "name": "operator", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "closePrintTrade", + "accounts": [ + { + "name": "op", + "isMut": true, + "isSigner": true + }, + { + "name": "creator", + "isMut": false, + "isSigner": false + }, + { + "name": "counterparty", + "isMut": false, + "isSigner": false + }, + { + "name": "operator", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "printTrade", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "seed", + "isMut": false, + "isSigner": false + }, + { + "name": "creatorWallet", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "initializeTraderRiskGroup", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": true + }, + { + "name": "traderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "closeTraderRiskGroup", + "accounts": [ + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "receiver", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "newOrder", + "accounts": [ + { + "name": "user", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "traderFeeStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "referrerTrg", + "isMut": true, + "isSigner": false, + "docs": [ + "referrer_trg receives a programmatic percentage of taker fees", + "sdks route this back to the user's trg", + "frontends will want to route this to their own trg" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "NewOrderParams" + } + } + ] + }, + { + "name": "clearOpenOrders", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClearOpenOrdersParams" + } + } + ] + }, + { + "name": "reinitializeTraderPositions", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "setNumRiskStateAccounts", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetNumRiskStateAccountsParams" + } + } + ] + }, + { + "name": "updateVarianceCache", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "consumeOrderbookEvents", + "accounts": [ + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "rewardTarget", + "isMut": true, + "isSigner": true + }, + { + "name": "feeModelProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "feeModelConfigurationAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "feeOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "riskAndFeeSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ConsumeOrderbookEventsParams" + } + } + ] + }, + { + "name": "cancelOrder", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "CancelOrderParams" + } + } + ] + }, + { + "name": "depositFunds", + "accounts": [ + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "user", + "isMut": false, + "isSigner": true + }, + { + "name": "userTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "capitalLimits", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "DepositFundsParams" + } + } + ] + }, + { + "name": "withdrawFunds", + "accounts": [ + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "user", + "isMut": false, + "isSigner": true + }, + { + "name": "userTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAcct", + "isMut": true, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "capitalLimits", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "WithdrawFundsParams" + } + } + ] + }, + { + "name": "updateProductFunding", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "UpdateProductFundingParams" + } + } + ] + }, + { + "name": "updateProductMarkPriceConfig", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "UpdateProductMarkPriceConfigParams" + } + } + ] + }, + { + "name": "transferFullPosition", + "accounts": [ + { + "name": "liquidator", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidateeRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidatorRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidatorRiskStateAccountInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "liquidateeRiskStateAccountInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "initializeCombo", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitializeComboParams" + } + } + ] + }, + { + "name": "updateTraderFunding", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "riskEngineProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "riskOutputRegister", + "isMut": true, + "isSigner": false + }, + { + "name": "traderRiskStateAccountInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "riskModelConfigurationAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "riskSigner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "clearExpiredOrderbook", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClearExpiredOrderbookParams" + } + } + ] + }, + { + "name": "popEvents", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "product", + "isMut": false, + "isSigner": false + }, + { + "name": "aaobProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "marketSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "orderbook", + "isMut": true, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "PopEventsParams" + } + } + ] + }, + { + "name": "sweepFees", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "feeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "stakingFeeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "marketProductGroupVault", + "isMut": true, + "isSigner": false + }, + { + "name": "feeCollectorTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "stakingFeeCollectorTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "chooseSuccessor", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "claimAuthority", + "accounts": [ + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "setupCapitalLimits", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "capitalLimitsState", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "updateCapitalLimits", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "capitalLimitsState", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "CapitalLimitsParams" + } + } + ] + }, + { + "name": "updateTraderRiskGroup", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "traderFeeStateAcct", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "updateTraderRiskGroupOwner", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": false + }, + { + "name": "traderRiskGroup", + "isMut": true, + "isSigner": false + }, + { + "name": "newOwner", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "disableKillswitch", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "enableKillswitch", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "marketProductGroup", + "isMut": true, + "isSigner": false + } + ], + "args": [] + } + ], + "accounts": [ + { + "name": "CapitalLimits", + "type": { + "kind": "struct", + "fields": [ + { + "name": "depositLimit", + "type": { + "defined": "Fractional" + } + }, + { + "name": "withdrawalLimit", + "type": { + "defined": "Fractional" + } + }, + { + "name": "marketProductGroup", + "type": "publicKey" + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "MarketProductGroup", + "docs": [ + "The highest level organizational unit of the Dex.", + "Market product groups exist independently of each other.", + "i.e. each trader, product etc, corresponds to exactly one market product group." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "authority", + "type": "publicKey" + }, + { + "name": "successor", + "type": "publicKey" + }, + { + "name": "vaultMint", + "type": "publicKey" + }, + { + "name": "collectedFees", + "type": { + "defined": "Fractional" + } + }, + { + "name": "feeCollector", + "type": "publicKey" + }, + { + "name": "decimals", + "type": "u64" + }, + { + "name": "riskEngineProgramId", + "type": "publicKey" + }, + { + "name": "feeModelProgramId", + "type": "publicKey" + }, + { + "name": "feeModelConfigurationAcct", + "type": "publicKey" + }, + { + "name": "riskModelConfigurationAcct", + "type": "publicKey" + }, + { + "name": "activeFlagsProducts", + "type": { + "defined": "Bitset" + } + }, + { + "name": "ewmaWindows", + "type": { + "array": [ + "u64", + 4 + ] + } + }, + { + "name": "marketProducts", + "type": { + "defined": "ProductArray" + } + }, + { + "name": "vaultBump", + "type": "u16" + }, + { + "name": "riskAndFeeBump", + "type": "u16" + }, + { + "name": "findFeesDiscriminantLen", + "type": "u16" + }, + { + "name": "validateAccountDiscriminantLen", + "type": "u16" + }, + { + "name": "findFeesDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "validateAccountHealthDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "validateAccountLiquidationDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "maxMakerFeeBps", + "type": "i16" + }, + { + "name": "minMakerFeeBps", + "type": "i16" + }, + { + "name": "maxTakerFeeBps", + "type": "i16" + }, + { + "name": "minTakerFeeBps", + "type": "i16" + }, + { + "name": "feeOutputRegister", + "type": "publicKey" + }, + { + "name": "riskOutputRegister", + "type": "publicKey" + }, + { + "name": "sequenceNumber", + "type": "u128" + }, + { + "name": "stakingFeeCollector", + "type": "publicKey" + }, + { + "name": "isKilled", + "type": "bool" + }, + { + "name": "createFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "addressLookupTable", + "type": "publicKey" + }, + { + "name": "closeRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + } + ] + } + }, + { + "name": "ProductArray", + "type": { + "kind": "struct", + "fields": [ + { + "name": "array", + "type": { + "array": [ + { + "defined": "Product" + }, + 256 + ] + } + } + ] + } + }, + { + "name": "PrintTradeProduct", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "size", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "PrintTrade", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isInitialized", + "type": "bool" + }, + { + "name": "creator", + "type": "publicKey" + }, + { + "name": "counterparty", + "type": "publicKey" + }, + { + "name": "seed", + "type": "publicKey" + }, + { + "name": "marketProductGroup", + "type": "publicKey" + }, + { + "name": "numProducts", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "PrintTradeProductIndex" + }, + 6 + ] + } + }, + { + "name": "price", + "type": { + "defined": "Fractional" + } + }, + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "operator", + "type": "publicKey" + }, + { + "name": "operatorCreatorFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "operatorCounterpartyFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "isSigned", + "type": "bool" + }, + { + "name": "isCancelled", + "type": { + "defined": "CancelStatus" + } + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "RiskOutputRegister", + "type": { + "kind": "struct", + "fields": [ + { + "name": "riskEngineOutput", + "type": { + "defined": "HealthResult" + } + } + ] + } + }, + { + "name": "TraderRiskGroup", + "docs": [ + "State account corresponding to a trader on a given market product group" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "marketProductGroup", + "type": "publicKey" + }, + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "activeProducts", + "type": { + "array": [ + "u8", + 128 + ] + } + }, + { + "name": "totalDeposited", + "type": { + "defined": "Fractional" + } + }, + { + "name": "totalWithdrawn", + "type": { + "defined": "Fractional" + } + }, + { + "name": "cashBalance", + "type": { + "defined": "Fractional" + } + }, + { + "name": "pendingCashBalance", + "type": { + "defined": "Fractional" + } + }, + { + "name": "pendingFees", + "type": { + "defined": "Fractional" + } + }, + { + "name": "validUntil", + "type": "u64" + }, + { + "name": "makerFeeBps", + "type": "i32" + }, + { + "name": "takerFeeBps", + "type": "i32" + }, + { + "name": "traderPositions", + "type": { + "array": [ + { + "defined": "TraderPosition" + }, + 16 + ] + } + }, + { + "name": "riskStateAccount", + "type": "publicKey" + }, + { + "name": "feeStateAccount", + "type": "publicKey" + }, + { + "name": "clientOrderId", + "type": "u128" + }, + { + "name": "openOrders", + "type": { + "defined": "OpenOrders" + } + }, + { + "name": "lockedCollateral", + "type": { + "array": [ + { + "defined": "LockedCollateral" + }, + 16 + ] + } + }, + { + "name": "notionalMakerVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "notionalTakerVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "referredTakersNotionalVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "referralFees", + "docs": [ + "referral_fees is not necessarily REFERRER_FEES_PROPORTION * referred_takers_notional_volume,", + "because combo volume has only collects 1/8th the fees as outright volume" + ], + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "PrintTradeExecutionOutput", + "type": { + "kind": "struct", + "fields": [ + { + "name": "result", + "type": { + "defined": "PrintTradeExecutionResult" + } + } + ] + } + }, + { + "name": "CapitalLimitsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "depositLimit", + "type": { + "defined": "Fractional" + } + }, + { + "name": "withdrawalLimit", + "type": { + "defined": "Fractional" + } + } + ] + } + } + ], + "types": [ + { + "name": "LockedCollateralProductIndex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "size", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "PrintTradeProductIndex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "size", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "ProductArray", + "type": { + "kind": "struct", + "fields": [ + { + "name": "array", + "type": { + "array": [ + { + "defined": "Product" + }, + 256 + ] + } + } + ] + } + }, + { + "name": "Side", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Bid" + }, + { + "name": "Ask" + } + ] + } + }, + { + "name": "Params", + "type": { + "kind": "struct", + "fields": [ + { + "name": "quantity", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "CallBackInfo", + "docs": [ + "Buffer attached to aaob events to tie owner to events" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "userAccount", + "type": "publicKey" + }, + { + "name": "openOrdersIdx", + "type": "u64" + }, + { + "name": "orderNonce", + "type": "u128" + }, + { + "name": "clientOrderId", + "type": "u64" + } + ] + } + }, + { + "name": "TraderFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "validUntil", + "type": "i64" + }, + { + "name": "makerFeeBps", + "type": "i32" + }, + { + "name": "takerFeeBps", + "type": "i32" + } + ] + } + }, + { + "name": "TraderFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "isAggressor", + "type": "bool" + }, + { + "name": "matchedQuoteQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "matchedBaseQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "product", + "type": "publicKey" + } + ] + } + }, + { + "name": "PriceEwma", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ewmaBid", + "type": { + "array": [ + { + "defined": "Fractional" + }, + 4 + ] + } + }, + { + "name": "ewmaAsk", + "type": { + "array": [ + { + "defined": "Fractional" + }, + 4 + ] + } + }, + { + "name": "bid", + "type": { + "defined": "Fractional" + } + }, + { + "name": "ask", + "type": { + "defined": "Fractional" + } + }, + { + "name": "slot", + "type": "u64" + }, + { + "name": "prevBid", + "type": { + "defined": "Fractional" + } + }, + { + "name": "prevAsk", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "OpenOrdersMetadata", + "type": { + "kind": "struct", + "fields": [ + { + "name": "askQtyInBook", + "type": { + "defined": "Fractional" + } + }, + { + "name": "bidQtyInBook", + "type": { + "defined": "Fractional" + } + }, + { + "name": "headIndex", + "type": "u64" + }, + { + "name": "numOpenOrders", + "type": "u64" + } + ] + } + }, + { + "name": "OpenOrders", + "type": { + "kind": "struct", + "fields": [ + { + "name": "freeListHead", + "type": "u64" + }, + { + "name": "totalOpenOrders", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "OpenOrdersMetadata" + }, + 256 + ] + } + }, + { + "name": "orders", + "type": { + "array": [ + { + "defined": "OpenOrdersNode" + }, + 1024 + ] + } + } + ] + } + }, + { + "name": "OpenOrdersNode", + "type": { + "kind": "struct", + "fields": [ + { + "name": "id", + "type": "u128" + }, + { + "name": "qty", + "type": "u64" + }, + { + "name": "clientId", + "type": "u64" + }, + { + "name": "prev", + "type": "u64" + }, + { + "name": "next", + "type": "u64" + } + ] + } + }, + { + "name": "Outright", + "docs": [ + "A market product corresponding to one underlying asset" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "metadata", + "type": { + "defined": "ProductMetadata" + } + }, + { + "name": "numRiskStateAccounts", + "docs": [ + "num_risk_state_accounts is the number of risk state accounts that have an untidied entry related to this product.", + "The DEX assumes that the attached risk engine will tidy (this likely means \"remove\")", + "risk entries related to this product during the first risk check after removing a TraderPosition." + ], + "type": "u64" + }, + { + "name": "productStatus", + "type": { + "defined": "ProductStatus" + } + }, + { + "name": "dust", + "type": { + "defined": "Fractional" + } + }, + { + "name": "cumFundingPerShare", + "type": { + "defined": "Fractional" + } + }, + { + "name": "cumSocialLossPerShare", + "type": { + "defined": "Fractional" + } + }, + { + "name": "openLongInterest", + "type": { + "defined": "Fractional" + } + }, + { + "name": "openShortInterest", + "type": { + "defined": "Fractional" + } + }, + { + "name": "markPriceQualifyingCumValue", + "type": { + "defined": "Fractional" + } + }, + { + "name": "markPriceMaxQualifyingWidth", + "type": { + "defined": "Fractional" + } + }, + { + "name": "padding", + "type": { + "array": [ + "u64", + 10 + ] + } + } + ] + } + }, + { + "name": "ProductMetadata", + "docs": [ + "Shared fields between Outright and Combo products" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u64" + }, + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "orderbook", + "type": "publicKey" + }, + { + "name": "tickSize", + "type": { + "defined": "Fractional" + } + }, + { + "name": "baseDecimals", + "type": "u64" + }, + { + "name": "priceOffset", + "type": { + "defined": "Fractional" + } + }, + { + "name": "notionalTradedVolume", + "type": { + "defined": "Fractional" + } + }, + { + "name": "prices", + "type": { + "defined": "PriceEwma" + } + } + ] + } + }, + { + "name": "Combo", + "docs": [ + "A market product with multiple legs that are each outrights" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "metadata", + "type": { + "defined": "ProductMetadata" + } + }, + { + "name": "numLegs", + "type": "u64" + }, + { + "name": "legsArray", + "type": { + "array": [ + { + "defined": "Leg" + }, + 4 + ] + } + } + ] + } + }, + { + "name": "Leg", + "docs": [ + "One part of a combo. Each leg corresponds to an outright with the ratio determining", + "relative weighting" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "ratio", + "type": "i64" + } + ] + } + }, + { + "name": "HealthInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "health", + "type": { + "defined": "HealthStatus" + } + }, + { + "name": "action", + "type": { + "defined": "ActionStatus" + } + } + ] + } + }, + { + "name": "LiquidationInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "health", + "type": { + "defined": "HealthStatus" + } + }, + { + "name": "action", + "type": { + "defined": "ActionStatus" + } + }, + { + "name": "totalSocialLoss", + "type": { + "defined": "Fractional" + } + }, + { + "name": "liquidationPrice", + "type": { + "defined": "Fractional" + } + }, + { + "name": "socialLosses", + "type": { + "array": [ + { + "defined": "SocialLoss" + }, + 16 + ] + } + } + ] + } + }, + { + "name": "SocialLoss", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "amount", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "OrderInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "totalOrderQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "matchedOrderQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "orderSide", + "type": { + "defined": "Side" + } + }, + { + "name": "orderPrice", + "type": { + "defined": "Fractional" + } + }, + { + "name": "isCombo", + "type": "bool" + }, + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "operationType", + "type": { + "defined": "OperationType" + } + }, + { + "name": "oldAskQtyInBook", + "type": { + "defined": "Fractional" + } + }, + { + "name": "oldBidQtyInBook", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "TraderPosition", + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "productKey", + "type": "publicKey" + }, + { + "name": "position", + "type": { + "defined": "Fractional" + } + }, + { + "name": "pendingPosition", + "type": { + "defined": "Fractional" + } + }, + { + "name": "productIndex", + "type": "u64" + }, + { + "name": "lastCumFundingSnapshot", + "type": { + "defined": "Fractional" + } + }, + { + "name": "lastSocialLossSnapshot", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "LockedCollateral", + "docs": [ + "there is one LockedCollateral for each product; the array is in one-to-one mapping with trader_positions" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "tag", + "type": { + "defined": "AccountTag" + } + }, + { + "name": "askQty", + "type": { + "defined": "Fractional" + } + }, + { + "name": "bidQty", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "Bitset", + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": { + "array": [ + "u128", + 2 + ] + } + } + ] + } + }, + { + "name": "Fractional", + "docs": [ + "Fractional Operations" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "m", + "type": "i64" + }, + { + "name": "exp", + "type": "u64" + } + ] + } + }, + { + "name": "InitializeMarketProductGroupParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "validateAccountDiscriminantLen", + "type": "u64" + }, + { + "name": "findFeesDiscriminantLen", + "type": "u64" + }, + { + "name": "validateAccountHealthDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "validateAccountLiquidationDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "findFeesDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "maxMakerFeeBps", + "type": "i16" + }, + { + "name": "minMakerFeeBps", + "type": "i16" + }, + { + "name": "maxTakerFeeBps", + "type": "i16" + }, + { + "name": "minTakerFeeBps", + "type": "i16" + } + ] + } + }, + { + "name": "UpdateMarketProductGroupParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "findFeesDiscriminantLen", + "type": "u16" + }, + { + "name": "findFeesDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "createFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeFeeStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "closeRiskStateAccountDiscriminant", + "type": { + "array": [ + "u8", + 8 + ] + } + } + ] + } + }, + { + "name": "InitializePrintTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numProducts", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "PrintTradeProductIndex" + }, + 6 + ] + } + }, + { + "name": "price", + "type": { + "defined": "Fractional" + } + }, + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "operatorCreatorFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "operatorCounterpartyFeeProportion", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "LockCollateralParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numProducts", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "LockedCollateralProductIndex" + }, + 6 + ] + } + } + ] + } + }, + { + "name": "SignPrintTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numProducts", + "type": "u64" + }, + { + "name": "products", + "type": { + "array": [ + { + "defined": "PrintTradeProductIndex" + }, + 6 + ] + } + }, + { + "name": "price", + "type": { + "defined": "Fractional" + } + }, + { + "name": "side", + "type": { + "defined": "Side" + } + }, + { + "name": "operatorCreatorFeeProportion", + "type": { + "defined": "Fractional" + } + }, + { + "name": "operatorCounterpartyFeeProportion", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "InitializeMarketProductParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "tickSize", + "type": { + "defined": "Fractional" + } + }, + { + "name": "baseDecimals", + "type": "u64" + }, + { + "name": "priceOffset", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "NewOrderParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "side", + "docs": [ + "The order's side (Bid or Ask)" + ], + "type": { + "defined": "Side" + } + }, + { + "name": "maxBaseQty", + "docs": [ + "The max quantity of base token to match and post" + ], + "type": { + "defined": "Fractional" + } + }, + { + "name": "orderType", + "docs": [ + "The order type (supported types include Limit, FOK, IOC and PostOnly)" + ], + "type": { + "defined": "OrderType" + } + }, + { + "name": "matchLimit", + "docs": [ + "The maximum number of orders to be matched against.", + "Setting this number too high can sometimes lead to excessive resource consumption which can cause a failure." + ], + "type": "u64" + }, + { + "name": "limitPrice", + "docs": [ + "The order's limit price in ticks" + ], + "type": { + "defined": "Fractional" + } + }, + { + "name": "referrerFeeBps", + "docs": [ + "In addition to taker fees; routed to referrer_trg; can be zero", + "Should be used like this: 3bps -> use the value Fractional{ m: 3, exp: 4 }", + "Min: 0; Max: 100bps." + ], + "type": { + "defined": "Fractional" + } + }, + { + "name": "clientOrderId", + "docs": [ + "Order id that can be specified by client. Can be arbitrary u64. Defaults to the value 0." + ], + "type": "u64" + } + ] + } + }, + { + "name": "ClearOpenOrdersParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "productIndex", + "type": "u64" + } + ] + } + }, + { + "name": "SetNumRiskStateAccountsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numRiskStateAccounts", + "type": "u64" + } + ] + } + }, + { + "name": "ConsumeOrderbookEventsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxIterations", + "docs": [ + "The maximum number of events to consume" + ], + "type": "u64" + } + ] + } + }, + { + "name": "CancelOrderParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderId", + "docs": [ + "The order_id of the order to cancel. Redundancy is used here to avoid having to iterate over all", + "open orders on chain. If order_id == 0, then client_order_id is used." + ], + "type": "u128" + }, + { + "name": "noErr", + "docs": [ + "do not fail when order is not found" + ], + "type": "bool" + }, + { + "name": "clientOrderId", + "docs": [ + "The client_order_id of the order to cancel. Used when order_id == 0." + ], + "type": "u64" + } + ] + } + }, + { + "name": "DepositFundsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "quantity", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "WithdrawFundsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "quantity", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "UpdateProductFundingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": { + "defined": "Fractional" + } + }, + { + "name": "newProductStatus", + "type": { + "defined": "ProductStatus" + } + } + ] + } + }, + { + "name": "UpdateProductMarkPriceConfigParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "markPriceQualifyingCumValue", + "type": { + "defined": "Fractional" + } + }, + { + "name": "markPriceMaxQualifyingWidth", + "type": { + "defined": "Fractional" + } + } + ] + } + }, + { + "name": "InitializeComboParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "tickSize", + "type": { + "defined": "Fractional" + } + }, + { + "name": "priceOffset", + "type": { + "defined": "Fractional" + } + }, + { + "name": "baseDecimals", + "type": "u64" + }, + { + "name": "ratios", + "type": { + "vec": "i8" + } + } + ] + } + }, + { + "name": "PopEventsParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numEventsToPop", + "type": "u64" + } + ] + } + }, + { + "name": "ClearExpiredOrderbookParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numOrdersToCancel", + "type": "u8" + } + ] + } + }, + { + "name": "DomainOrProgramError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "DexErr", + "fields": [ + { + "defined": "DexError" + } + ] + }, + { + "name": "UtilErr", + "fields": [ + { + "defined": "UtilError" + } + ] + }, + { + "name": "ProgramErr", + "fields": [ + { + "name": "msg", + "type": "string" + } + ] + }, + { + "name": "Other", + "fields": [ + { + "name": "code", + "type": "u32" + }, + { + "name": "msg", + "type": "string" + } + ] + } + ] + } + }, + { + "name": "UtilError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "AccountAlreadyInitialized" + }, + { + "name": "AccountUninitialized" + }, + { + "name": "DuplicateProductKey" + }, + { + "name": "PublicKeyMismatch" + }, + { + "name": "AssertionError" + }, + { + "name": "InvalidMintAuthority" + }, + { + "name": "IncorrectOwner" + }, + { + "name": "PublicKeysShouldBeUnique" + }, + { + "name": "NotRentExempt" + }, + { + "name": "NumericalOverflow" + }, + { + "name": "RoundError" + }, + { + "name": "DivisionbyZero" + }, + { + "name": "InvalidReturnValue" + }, + { + "name": "SqrtRootError" + }, + { + "name": "ZeroPriceError" + }, + { + "name": "ZeroQuantityError" + }, + { + "name": "SerializeError" + }, + { + "name": "DeserializeError" + }, + { + "name": "InvalidBitsetIndex" + }, + { + "name": "PushToFullBitvec" + }, + { + "name": "U8MaxNotAllowedInBitvec" + } + ] + } + }, + { + "name": "DexError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "ContractIsExpired" + }, + { + "name": "ContractIsNotExpired" + }, + { + "name": "InvalidSystemProgramAccount" + }, + { + "name": "InvalidAobProgramAccount" + }, + { + "name": "InvalidStateAccountOwner" + }, + { + "name": "InvalidOrderIndex" + }, + { + "name": "UserAccountFull" + }, + { + "name": "TransactionAborted" + }, + { + "name": "MissingUserAccount" + }, + { + "name": "OrderNotFound" + }, + { + "name": "NoOp" + }, + { + "name": "OutofFunds" + }, + { + "name": "UserAccountStillActive" + }, + { + "name": "MarketStillActive" + }, + { + "name": "InvalidMarketSignerAccount" + }, + { + "name": "InvalidOrderbookAccount" + }, + { + "name": "InvalidMarketAdminAccount" + }, + { + "name": "InvalidBaseVaultAccount" + }, + { + "name": "InvalidQuoteVaultAccount" + }, + { + "name": "FullMarketProductGroup" + }, + { + "name": "MissingMarketProduct" + }, + { + "name": "InvalidWithdrawalAmount" + }, + { + "name": "InvalidTakerTrader" + }, + { + "name": "FundsError" + }, + { + "name": "InactiveProductError" + }, + { + "name": "TooManyOpenOrdersError" + }, + { + "name": "NoMoreOpenOrdersError" + }, + { + "name": "NonZeroPriceTickExponentError" + }, + { + "name": "DuplicateProductNameError" + }, + { + "name": "InvalidRiskResponseError" + }, + { + "name": "InvalidAccountHealthError" + }, + { + "name": "OrderbookIsEmptyError" + }, + { + "name": "CombosNotRemoved" + }, + { + "name": "AccountNotLiquidable" + }, + { + "name": "FundingPrecisionError" + }, + { + "name": "ProductDecimalPrecisionError" + }, + { + "name": "ProductNotOutright" + }, + { + "name": "ProductNotCombo" + }, + { + "name": "InvalidSocialLossCalculation" + }, + { + "name": "ProductIndexMismatch" + }, + { + "name": "InvalidOrderID" + }, + { + "name": "InvalidBytesForZeroCopyDeserialization" + }, + { + "name": "IncorrectPrintTradeSize" + }, + { + "name": "IncorrectPrintTradePrice" + }, + { + "name": "IncorrectPrintTradeSide" + }, + { + "name": "IncorrectPrintTradeOperatorCreatorFees" + }, + { + "name": "IncorrectPrintTradeOperatorCounterpartyFees" + }, + { + "name": "InvalidPrintTradeOperatorFees" + }, + { + "name": "DepositLimitExceeded" + }, + { + "name": "WithdrawLimitExceeded" + }, + { + "name": "NegativeDepositLimit" + }, + { + "name": "NegativeWithdrawLimit" + }, + { + "name": "DepositDeniedInsufficientBalanceOnWhitelistAtaToken" + }, + { + "name": "DepositDeclinedUnfrozenWhitelistAtaToken" + }, + { + "name": "DepositDeclinedNonExistentWhitelistAtaTokenOnTraderRiskGroup" + }, + { + "name": "InvalidProductStatusInUpdateFunding" + }, + { + "name": "ContractIsNotExpiring" + }, + { + "name": "ContractHasNonZeroOpenInterest" + }, + { + "name": "ContractHasNonZeroOpenInterestOrRiskStateAccounts" + }, + { + "name": "ContractIsActive" + }, + { + "name": "FailedToGetOrderQuantity" + }, + { + "name": "SelfTradeBehaviorDecrementTakeIsDisallowed" + }, + { + "name": "PriceBandViolation" + }, + { + "name": "UnexpectedImbalancedOpenInterest" + }, + { + "name": "MaximumOpenInterestExceeded" + }, + { + "name": "MarketProductGroupKillswitchIsOn" + }, + { + "name": "InvalidFutureExpiry" + }, + { + "name": "MaxReferrerFeeBpsExceeded" + }, + { + "name": "PrintTradeOperatorDidNotSign" + }, + { + "name": "PrintTradeInvalidProductsLength" + }, + { + "name": "ContractIsNotActive" + }, + { + "name": "PrintTradeInvalidNumProducts" + }, + { + "name": "PrintTradeProductMismatch" + }, + { + "name": "InsufficientLockedCollateral" + }, + { + "name": "OracleNotWhitelisted" + } + ] + } + }, + { + "name": "AccountTag", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Uninitialized" + }, + { + "name": "MarketProductGroup" + }, + { + "name": "TraderRiskGroup" + }, + { + "name": "TraderPosition" + }, + { + "name": "MarketProductGroupWithCombos" + }, + { + "name": "ComboGroup" + }, + { + "name": "Combo" + }, + { + "name": "RiskProfile" + }, + { + "name": "LockedCollateral" + } + ] + } + }, + { + "name": "ProductStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Uninitialized" + }, + { + "name": "Initialized" + }, + { + "name": "Expired" + }, + { + "name": "Expiring" + } + ] + } + }, + { + "name": "OrderType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Limit" + }, + { + "name": "ImmediateOrCancel" + }, + { + "name": "FillOrKill" + }, + { + "name": "PostOnly" + } + ] + } + }, + { + "name": "CancelStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Active" + }, + { + "name": "CreatorCancelled" + }, + { + "name": "CounterpartyCancelled" + } + ] + } + }, + { + "name": "Product", + "docs": [ + "Unify Outright and Combo" + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "Outright", + "fields": [ + { + "name": "outright", + "type": { + "defined": "Outright" + } + } + ] + }, + { + "name": "Combo", + "fields": [ + { + "name": "combo", + "type": { + "defined": "Combo" + } + } + ] + } + ] + } + }, + { + "name": "OperationType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NewOrder" + }, + { + "name": "CancelOrder" + }, + { + "name": "CheckHealth" + }, + { + "name": "PositionTransfer" + }, + { + "name": "ConsumeEvents" + }, + { + "name": "CheckWithdrawalHealth" + }, + { + "name": "LockCollateral" + }, + { + "name": "SignPrinTrade" + } + ] + } + }, + { + "name": "HealthResult", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Health", + "fields": [ + { + "name": "health_info", + "type": { + "defined": "HealthInfo" + } + } + ] + }, + { + "name": "Liquidation", + "fields": [ + { + "name": "liquidation_info", + "type": { + "defined": "LiquidationInfo" + } + } + ] + } + ] + } + }, + { + "name": "HealthStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Healthy" + }, + { + "name": "Unhealthy" + }, + { + "name": "Liquidatable" + }, + { + "name": "NotLiquidatable" + } + ] + } + }, + { + "name": "ActionStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Approved" + }, + { + "name": "NotApproved" + } + ] + } + }, + { + "name": "PrintTradeExecutionResult", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CounterpartyHasntSigned" + }, + { + "name": "CreatorCancelled" + }, + { + "name": "CounterpartyCancelled" + }, + { + "name": "CreatorNotEnoughLockedCollateral" + }, + { + "name": "CounterpartyNotEnoughLockedCollateral" + }, + { + "name": "Success" + } + ] + } + } + ], + "events": [ + { + "name": "DexOrderSummary", + "fields": [ + { + "name": "postedOrderId", + "type": { + "option": "u128" + }, + "index": false + }, + { + "name": "totalBaseQty", + "type": "u64", + "index": false + }, + { + "name": "totalQuoteQty", + "type": "u64", + "index": false + }, + { + "name": "totalBaseQtyPosted", + "type": "u64", + "index": false + } + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/keypairs/operator-trg-risk-state.json b/packages/validator/dependencies/hxro/keypairs/operator-trg-risk-state.json new file mode 100644 index 000000000..f6df6551b --- /dev/null +++ b/packages/validator/dependencies/hxro/keypairs/operator-trg-risk-state.json @@ -0,0 +1 @@ +[140,178,122,123,227,247,157,74,161,95,3,229,95,104,226,238,52,99,225,143,191,9,207,105,165,96,181,108,122,42,224,92,84,158,145,6,32,178,169,177,129,126,50,241,104,37,63,149,247,11,107,47,229,67,102,38,124,59,72,103,2,43,159,205] \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/keypairs/operator-trg.json b/packages/validator/dependencies/hxro/keypairs/operator-trg.json new file mode 100644 index 000000000..5d9fa53ae --- /dev/null +++ b/packages/validator/dependencies/hxro/keypairs/operator-trg.json @@ -0,0 +1 @@ +[168,232,99,222,141,177,104,101,96,34,154,127,107,161,69,146,61,70,137,231,19,89,170,99,230,152,30,139,167,26,198,40,43,19,34,66,232,78,251,245,249,45,22,99,93,237,77,172,8,223,244,200,34,239,11,197,250,204,83,185,19,165,141,176] \ No newline at end of file diff --git a/packages/validator/dependencies/hxro/programs/aaob_DchhQ6g8LyRCM5mnao1MAg3g9twfqBbDmUWgpQpFfn1b.so b/packages/validator/dependencies/hxro/programs/aaob_DchhQ6g8LyRCM5mnao1MAg3g9twfqBbDmUWgpQpFfn1b.so new file mode 100644 index 000000000..f07616264 Binary files /dev/null and b/packages/validator/dependencies/hxro/programs/aaob_DchhQ6g8LyRCM5mnao1MAg3g9twfqBbDmUWgpQpFfn1b.so differ diff --git a/packages/validator/dependencies/hxro/programs/constant_fees.so b/packages/validator/dependencies/hxro/programs/constant_fees.so new file mode 100755 index 000000000..5ef894b2c Binary files /dev/null and b/packages/validator/dependencies/hxro/programs/constant_fees.so differ diff --git a/packages/validator/dependencies/hxro/programs/dex_FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL.so b/packages/validator/dependencies/hxro/programs/dex_FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL.so new file mode 100644 index 000000000..c9ec58625 Binary files /dev/null and b/packages/validator/dependencies/hxro/programs/dex_FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL.so differ diff --git a/packages/validator/dependencies/hxro/programs/instrument_8981bZYszfz1FrFVx7gcUm61RfawMoAHnURuERRJKdkq.so b/packages/validator/dependencies/hxro/programs/instrument_8981bZYszfz1FrFVx7gcUm61RfawMoAHnURuERRJKdkq.so new file mode 100644 index 000000000..a7095159e Binary files /dev/null and b/packages/validator/dependencies/hxro/programs/instrument_8981bZYszfz1FrFVx7gcUm61RfawMoAHnURuERRJKdkq.so differ diff --git a/packages/validator/dependencies/hxro/programs/noop_risk_engine.so b/packages/validator/dependencies/hxro/programs/noop_risk_engine.so new file mode 100755 index 000000000..1dffbf099 Binary files /dev/null and b/packages/validator/dependencies/hxro/programs/noop_risk_engine.so differ diff --git a/packages/validator/dependencies/hxro/pubkey-naming.json b/packages/validator/dependencies/hxro/pubkey-naming.json new file mode 100644 index 000000000..e5ae78175 --- /dev/null +++ b/packages/validator/dependencies/hxro/pubkey-naming.json @@ -0,0 +1,22 @@ +{ + "12fr3WXr7Mh1wGMPQe1qe5VUeexz1BRzJ6SfAhHPgC1b": "taker-fee-state", + "3fw72yL2pG7cKmPs4TYJa6C9496NyypFpj5UQVLe515j": "product-0", + "3q4UnqSY7ARzcbX8B647soB5Xji4Qr23idLQGpZGLzJa": "product-1-orderbook", + "4Lrt2YtUyEB8SrtTR3Tsb1DBGU9hRU6xNuDZd9zJrKG9": "maker-trg", + "4Ucpj5hWiz8msBQVgFSUnqxQCkJWEPn5YbpwFbbhxoa6": "fee-output", + "5T9ApZtB3yTKRv6ssmHdr15hB3d9XnA3WwrYAZTScetY": "risk-config", + "5T9gt3frWPAvu1hxEULbsKrP2WF4ggqSxCMqpJvtWXHV": "fees-program", + "6Prp1p7vjS6LCb8xR1oQqsbUPX9AWaHz9PBVbdzAFHT4": "execution-output", + "78haJHMHdjdp6phofBzQwbHdNobFyYDrGRdgfAWQfwxL": "taker-risk-state", + "8qBD1ZewtfoxNAy3E45f5fRtwQUhLku55cVVxT5cMPef": "product-1", + "A3tmPza8B4rvHFiUkPHLsL7Nnv4ERK8utFfwPa1yAn18": "taker-trg", + "BVDTB61eHY7UnCb4ueatdaV4rctTzqfLAL6sQDeMNSHA": "risk-program", + "CTc7swEKXFCD1gsnvVcQyozXK2zJ3roQr3fuU7G6uerC": "product-0-orderbook", + "EDHbf67fJZBZoKFJGPEC7b9qimnave5DiYBctVWEysYb": "maker-risk-state", + "FEaUEZkFnyTfkWm8GgYR7sbyMkoW5nYSyqECDmKfQQoo": "risk-output", + "FU68EKUppMq89TSVBELYpbsdw2FpzKwx79mPvCARmM9t": "maker-fee-state", + "FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL": "dex-program", + "G6b2JSF5M7SySosNC4GkHHmqXczSCGUycppRiYvTQ7aK": "vault", + "GBhshm4LFyYTv9iPocz7kmLpRhvvPNoxH9wgB57uNamm": "fee-config", + "GCXr6LDZurWK8Hkm18gZzJ7jUgvrYEVFFeWUR346fd42": "mpg" +} \ No newline at end of file diff --git a/packages/validator/fixtures/accounts/hxro-print-trade-provider-config.json b/packages/validator/fixtures/accounts/hxro-print-trade-provider-config.json new file mode 100644 index 000000000..984d99e94 --- /dev/null +++ b/packages/validator/fixtures/accounts/hxro-print-trade-provider-config.json @@ -0,0 +1,13 @@ +{ + "pubkey": "P9Frq2k9Rx1ixDm71eaBcgN5xevWb7NNoPzZJrWWgC3", + "account": { + "lamports": 1169280, + "data": [ + "mwyq4B76zILh05IpcF4Uyf+vsSOCQd79Yzo2cN7taTwXsxHuZE4XXw==", + "base64" + ], + "owner": "6zyXbd44vYHhpC1gxZr2BhM6m7jThqsBphn2GD36bUi3", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/fixtures/accounts/rfq-base-asset-btc.json b/packages/validator/fixtures/accounts/rfq-base-asset-btc.json index 693a2d8b9..55de34580 100644 --- a/packages/validator/fixtures/accounts/rfq-base-asset-btc.json +++ b/packages/validator/fixtures/accounts/rfq-base-asset-btc.json @@ -1,12 +1,12 @@ { - "pubkey": "D3AV2d2Dpf54BPqvJ7pNfuzWboFFY4tNH8U6Me5Jz44y", + "pubkey": "FrQXf9PvuwisbxSaGwXdFipxu8aCEvAXCMRLcPkX64Ct", "account": { "lamports": 2804880, "data": [ "A/5kN3P/Bxf/AAABAABujEl3g94AWWT2ktFbxNUQIrF1jMwAhCmERj8Lf9/+nwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAEJUQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-base-asset-eth.json b/packages/validator/fixtures/accounts/rfq-base-asset-eth.json index d9fdd78e4..ae1dacff6 100644 --- a/packages/validator/fixtures/accounts/rfq-base-asset-eth.json +++ b/packages/validator/fixtures/accounts/rfq-base-asset-eth.json @@ -1,12 +1,12 @@ { - "pubkey": "CjN93gP6pPLNyEmKaSbkikSQuw9TY5Xy8MoqE5UCwDPR", + "pubkey": "4U5MABcScyet6DtPRreD6auphbrybn6SJni1kNo2Bbk1", "account": { "lamports": 2804880, "data": [ "A/5kN3P/Bxf/AgABAQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAn0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAEVUSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-base-asset-sol.json b/packages/validator/fixtures/accounts/rfq-base-asset-sol.json index 363e2a2c4..2b72b9b1d 100644 --- a/packages/validator/fixtures/accounts/rfq-base-asset-sol.json +++ b/packages/validator/fixtures/accounts/rfq-base-asset-sol.json @@ -1,12 +1,12 @@ { - "pubkey": "FkyRgBpQZNuxgYZpnrg6bg1s3TTSN7fmyoELcFQwmacD", + "pubkey": "4n58twpt2baDXrRoay8Go8kniKBWfEnG1zsenvUUsMyZ", "account": { "lamports": 2804880, "data": [ "A/5kN3P/Bxf8AQABAgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO8Ni2/aLOukHaFdQJXR2jkqDS+O0MbHvA9M+sjCgLVtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAFNPTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-collateral-info-dao.json b/packages/validator/fixtures/accounts/rfq-collateral-info-dao.json index 9563912e3..b4dd69524 100644 --- a/packages/validator/fixtures/accounts/rfq-collateral-info-dao.json +++ b/packages/validator/fixtures/accounts/rfq-collateral-info-dao.json @@ -1,12 +1,12 @@ { - "pubkey": "GwzpnXhzMNSgLdNJXKtyLB9ZbSiwFTDdomBh4UnVB5Q2", + "pubkey": "Fr2tKpuV7Jvo51wpBU4so7qv1AmUc4uBh62ZUAy5oevy", "account": { "lamports": 3062400, "data": [ - "o0RSJdyyEpn7ZJJsMbdIfexWonT9yyqMxu1HHDD0uX9BX7OXjafeIJn/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "o0RSJdyyEpn/ZJJsMbdIfexWonT9yyqMxu1HHDD0uX9BX7OXjafeIJn/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-collateral-info-maker.json b/packages/validator/fixtures/accounts/rfq-collateral-info-maker.json index 8f133aac6..0db4781b3 100644 --- a/packages/validator/fixtures/accounts/rfq-collateral-info-maker.json +++ b/packages/validator/fixtures/accounts/rfq-collateral-info-maker.json @@ -1,12 +1,12 @@ { - "pubkey": "B8cMG9jrUgcUS2FdZfJLEnjFhL828WvhE8xTqfM1xDSK", + "pubkey": "EiqZBnwa8b7tLvXhXSwTW4zqkcT9UXpZi5ADmsyCKpq4", "account": { "lamports": 3062400, "data": [ - "o0RSJdyyEpn/RGcv6WZ5nR0SQFCdXFvcEqmvImWuWJkw9t9ogVLKIbf/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "o0RSJdyyEpn6RGcv6WZ5nR0SQFCdXFvcEqmvImWuWJkw9t9ogVLKIbf9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-collateral-info-taker.json b/packages/validator/fixtures/accounts/rfq-collateral-info-taker.json index 4a7f4a297..f4e0c6ca7 100644 --- a/packages/validator/fixtures/accounts/rfq-collateral-info-taker.json +++ b/packages/validator/fixtures/accounts/rfq-collateral-info-taker.json @@ -1,12 +1,12 @@ { - "pubkey": "5Xpck9sewCtS1KBECyHonaLErZT9C1Cnve11W5TWLRCH", + "pubkey": "7H6gn5kksiDYRCeMRnyFLd7j8AnaMHrV8UqopTgDucji", "account": { "lamports": 3062400, "data": [ - "o0RSJdyyEpn/yxkDb26bL0vjVHOsyuI/i4PC7QTivY42lYqpvanXNlf7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "o0RSJdyyEpn/yxkDb26bL0vjVHOsyuI/i4PC7QTivY42lYqpvanXNlf/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-collateral-token-dao.json b/packages/validator/fixtures/accounts/rfq-collateral-token-dao.json index 21f9e1664..bcab8f2bb 100644 --- a/packages/validator/fixtures/accounts/rfq-collateral-token-dao.json +++ b/packages/validator/fixtures/accounts/rfq-collateral-token-dao.json @@ -1,9 +1,9 @@ { - "pubkey": "6A4Zb6yNp8g7nfSY6kJPtrozDfKjJo1dAL1JQuoKpwHd", + "pubkey": "DYj8vXUBpTxrptvRm2j2sCNAo7xPmPDidyp925YKNPZ", "account": { "lamports": 2039280, "data": [ - "aRq5Tm95/2xFlF3S5PgBarK9se95mD6qo+5+Z1sAZuns9gyb560QSE+xCnX/2taeg+WJKxx/syFzd8sOLafudwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "aRq5Tm95/2xFlF3S5PgBarK9se95mD6qo+5+Z1sAZunckzU36JNeZ0cuJugU4hoQzl4D+ki3sLko821orBQWngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "base64" ], "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", diff --git a/packages/validator/fixtures/accounts/rfq-collateral-token-maker.json b/packages/validator/fixtures/accounts/rfq-collateral-token-maker.json index 66c05b7cd..448a2d668 100644 --- a/packages/validator/fixtures/accounts/rfq-collateral-token-maker.json +++ b/packages/validator/fixtures/accounts/rfq-collateral-token-maker.json @@ -1,9 +1,9 @@ { - "pubkey": "EK4QgzVVh3xCwhUSA7rYQuXXEw55jSnjhk6WRoqqKV2s", + "pubkey": "HZoNij3PMue4MPar4SUydqENTF6CNDAC7CXN4HaX5gYr", "account": { "lamports": 2039280, "data": [ - "aRq5Tm95/2xFlF3S5PgBarK9se95mD6qo+5+Z1sAZumWh+eQKJUVQ3K7T57fvQBRB5ibV6Eu3TGmP3WqFZmsBACAxqR+jQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "aRq5Tm95/2xFlF3S5PgBarK9se95mD6qo+5+Z1sAZunL36T6x1fNwTdU5P415pUA2qfI32G+dg9HMfsT+wEqfwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "base64" ], "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", diff --git a/packages/validator/fixtures/accounts/rfq-collateral-token-taker.json b/packages/validator/fixtures/accounts/rfq-collateral-token-taker.json index 9d21e3ad6..1fbf32253 100644 --- a/packages/validator/fixtures/accounts/rfq-collateral-token-taker.json +++ b/packages/validator/fixtures/accounts/rfq-collateral-token-taker.json @@ -1,9 +1,9 @@ { - "pubkey": "2ChcGSXg2kB2UaPbicxyraTTTuPzaUppioSYiUungodw", + "pubkey": "HAWway8wsxpxT4Fds8HvNgS8QGkDLJQubjT9DK1VcdfF", "account": { "lamports": 2039280, "data": [ - "aRq5Tm95/2xFlF3S5PgBarK9se95mD6qo+5+Z1sAZulDVAMKF8UfyoBiSzIX9GhRItPnJYfDvOYXpImeivHxdgCAxqR+jQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "aRq5Tm95/2xFlF3S5PgBarK9se95mD6qo+5+Z1sAZuldRdft+TMCmnE85e5qnNbYqpofKWjoeC78RHFerxuv2QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "base64" ], "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", diff --git a/packages/validator/fixtures/accounts/rfq-mint-info-btc.json b/packages/validator/fixtures/accounts/rfq-mint-info-btc.json index ce930aaa8..671d27f0f 100644 --- a/packages/validator/fixtures/accounts/rfq-mint-info-btc.json +++ b/packages/validator/fixtures/accounts/rfq-mint-info-btc.json @@ -1,12 +1,12 @@ { - "pubkey": "46iUXCqyuVhoN9hpdETa6eyhbMDLQh3HjbpKS2FmygE7", + "pubkey": "Erqa3YWCcmzRRUbimK2WryFyGXW1xmBWDeCvo1tKmd3R", "account": { "lamports": 2324640, "data": [ - "x3PV3dsdh6791QdAbyji9GYRbBJEIDGa7a7Ri6BXDdP2m5O+Zgs5buYJAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "x3PV3dsdh67+1QdAbyji9GYRbBJEIDGa7a7Ri6BXDdP2m5O+Zgs5buYJAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-mint-info-eth.json b/packages/validator/fixtures/accounts/rfq-mint-info-eth.json index b31642f1f..17a3d96b4 100644 --- a/packages/validator/fixtures/accounts/rfq-mint-info-eth.json +++ b/packages/validator/fixtures/accounts/rfq-mint-info-eth.json @@ -1,12 +1,12 @@ { - "pubkey": "CzMVe1ZbzCp1BdRYezghVzBsXoiZgBAodbR33gu8WTFC", + "pubkey": "BKf1HuUftLk5mLX9hHNbJdUPRapGEJaaedZK1NNzewhH", "account": { "lamports": 2324640, "data": [ - "x3PV3dsdh67/KOeZ7XiJHyjoRFaYKs+85ejjnJrjfLSWJ2Uf3N+pjqwJAQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "x3PV3dsdh67+KOeZ7XiJHyjoRFaYKs+85ejjnJrjfLSWJ2Uf3N+pjqwJAQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-mint-info-sol.json b/packages/validator/fixtures/accounts/rfq-mint-info-sol.json index 66c3e8262..392e19161 100644 --- a/packages/validator/fixtures/accounts/rfq-mint-info-sol.json +++ b/packages/validator/fixtures/accounts/rfq-mint-info-sol.json @@ -1,12 +1,12 @@ { - "pubkey": "H75NkwkmBuom83nuqQwyuqQZQQuyue59frfmgc5QALXv", + "pubkey": "7kuX93pjSAfd3nraBqdCHzrzwW3L1JM9no8SjEwuzYYt", "account": { "lamports": 2324640, "data": [ "x3PV3dsdh67/KOWejuQHeNYncgTtjfJmQZMafgdeEmJ0ZWn5c9DFHpsJAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-mint-info-usd-quote.json b/packages/validator/fixtures/accounts/rfq-mint-info-usd-quote.json index f9c21fd34..0a6326c5c 100644 --- a/packages/validator/fixtures/accounts/rfq-mint-info-usd-quote.json +++ b/packages/validator/fixtures/accounts/rfq-mint-info-usd-quote.json @@ -1,12 +1,12 @@ { - "pubkey": "2eDUTTPjPs8CusiikNDG4rWSZvaVPbodkJrU9bNDYiSX", + "pubkey": "5Atpbyw3tBjjc8EYrbjE1a4FNqyLUszFGsNo3R5bR3y8", "account": { "lamports": 2324640, "data": [ "x3PV3dsdh67/e2UTGuRioXUH1thtTs+0Qj7hdyxRnoHwm55RQpy8WkYJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "base64" ], - "owner": "J7WkE9mTzwTo3pjxENdrH7sekZPrN2VYNpk1pgfZxVr9", + "owner": "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/rfq-protocol.json b/packages/validator/fixtures/accounts/rfq-protocol.json index 9aefb2b96..7f06bc485 100644 --- a/packages/validator/fixtures/accounts/rfq-protocol.json +++ b/packages/validator/fixtures/accounts/rfq-protocol.json @@ -1,12 +1,12 @@ { - "pubkey": "9xcYm9iSMH5aw7dQQBb711wpy3fYLEPfsNhbiJM4yqkU", + "pubkey": "AinWDnZWiEkWrNGH9jbvS2JXaBFZwnRE5ssNGyop882L", "account": { - "lamports": 33895200, + "lamports": 35245440, "data": [ - "ITOthiOMw/hkkmwxt0h97FaidP3LKozG7UccMPS5f0Ffs5eNp94gmf4BAC0xAQAAAACAlpgAAAAAAADh9QUAAAAAAGXNHQAAAABXDOQgzydMH+ZRgmUiu2l19Vnyq1wVR35OLdD4mObdU2kauU5vef9sRZRd0uT4AWqyvbHveZg+qqPufmdbAGbpAwAAAK5NLOfqYWrHRlUywKtjfd8qcXIG2SdJ6CJsOcSdStteAQEBBwMDBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAh4qn7+zq+3cWnlFlgi9vA6gec0len/0P5uUkxxsJr6ABAAIHAwMEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOtklH0CoWMHYr5p2cci65zXOxIf9IrHFBBI3NCo6bSwEAAwcDAwQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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r3Au6RFdo", "executable": false, "rentEpoch": 0 } diff --git a/packages/validator/fixtures/accounts/risk-engine-config.json b/packages/validator/fixtures/accounts/risk-engine-config.json deleted file mode 100644 index 9ac0d1cf9..000000000 --- a/packages/validator/fixtures/accounts/risk-engine-config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pubkey": "5tpJhxJTEh49PH3Q1hhDG3nNjoeJ1vW1iCqVe8rqe83D", - "account": { - "lamports": 23274240, - "data": [ - "mwyq4B76zIIAypo7AAAAAACUNXcAAAAACQAAAAAAAAB7FK5H4XqEP5qZmZmZmbk/AAPMEgAAAAB7FK5H4XqEPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACamZmZmZmpPwAAAAAAAOA/exSuR+F6lD+amZmZmZnJP3sUrkfheqQ/MzMzMzMz0z97FK5H4Xq0P5qZmZmZmdk/uB6F61G4vj8AAAAAAADgP5qZmZmZmck/MzMzMzMz4z8zMzMzMzPTP2ZmZmZmZuY/mpmZmZmZqT+amZmZmZnpP3sUrkfheqQ/mpmZmZmZ2T97FK5H4Xq0PzMzMzMzM+M/exSuR+F6xD+amZmZmZnpP7gehetRuM4/AAAAAAAA8D+amZmZmZnZPzMzMzMzM/M/MzMzMzMz4z9mZmZmZmb2P5qZmZmZmak/MzMzMzMz8z+4HoXrUbiuPzMzMzMzM+M/uB6F61G4vj/NzMzMzMzsP7gehetRuM4/M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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "base64" - ], - "owner": "6rosVyXKwj9tiHubXUBTguaCELsci4pBEuiRy36Lbz1p", - "executable": false, - "rentEpoch": 0 - } -} \ No newline at end of file diff --git a/packages/validator/fixtures/accounts/spot-instrument-config.json b/packages/validator/fixtures/accounts/spot-instrument-config.json new file mode 100644 index 000000000..c9514238c --- /dev/null +++ b/packages/validator/fixtures/accounts/spot-instrument-config.json @@ -0,0 +1,13 @@ +{ + "pubkey": "7J21igTMpQa18YueGJGNmp54m1VxsBHz4LEjiV6P28DJ", + "account": { + "lamports": 1002240, + "data": [ + "mwyq4B76zIKAlpgAAAAAAA==", + "base64" + ], + "owner": "BMXWVaYPVJ4G8g2MMJt51CDgjHHuoirPMvsTUadv3s3v", + "executable": false, + "rentEpoch": 0 + } +} \ No newline at end of file diff --git a/packages/validator/fixtures/programs/euro_primitive.so b/packages/validator/fixtures/programs/euro_primitive.so deleted file mode 100755 index 59d6897a8..000000000 Binary files a/packages/validator/fixtures/programs/euro_primitive.so and /dev/null differ diff --git a/packages/validator/fixtures/programs/hxro_print_trade_provider.so b/packages/validator/fixtures/programs/hxro_print_trade_provider.so new file mode 100755 index 000000000..3c711cca5 Binary files /dev/null and b/packages/validator/fixtures/programs/hxro_print_trade_provider.so differ diff --git a/packages/validator/fixtures/programs/pseudo_pyth.so b/packages/validator/fixtures/programs/pseudo_pyth.so deleted file mode 100755 index 87aec20b7..000000000 Binary files a/packages/validator/fixtures/programs/pseudo_pyth.so and /dev/null differ diff --git a/packages/validator/fixtures/programs/pseudo_pyth_idl.ts b/packages/validator/fixtures/programs/pseudo_pyth_idl.ts deleted file mode 100644 index f785eb206..000000000 --- a/packages/validator/fixtures/programs/pseudo_pyth_idl.ts +++ /dev/null @@ -1,173 +0,0 @@ -export type Pyth = { - "version": "0.1.0", - "name": "pyth", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "price", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "price", - "type": "i64" - }, - { - "name": "expo", - "type": "i32" - }, - { - "name": "conf", - "type": "u64" - } - ] - }, - { - "name": "setPrice", - "accounts": [ - { - "name": "price", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "price", - "type": "i64" - } - ] - }, - { - "name": "getPrice", - "accounts": [ - { - "name": "price", - "isMut": false, - "isSigner": false - }, - { - "name": "dataAccount", - "isMut": true, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - } - ], - "accounts": [ - { - "name": "dataAccount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "price", - "type": "u64" - } - ] - } - } - ] -}; - -export const IDL: Pyth = { - "version": "0.1.0", - "name": "pyth", - "instructions": [ - { - "name": "initialize", - "accounts": [ - { - "name": "price", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "price", - "type": "i64" - }, - { - "name": "expo", - "type": "i32" - }, - { - "name": "conf", - "type": "u64" - } - ] - }, - { - "name": "setPrice", - "accounts": [ - { - "name": "price", - "isMut": true, - "isSigner": false - } - ], - "args": [ - { - "name": "price", - "type": "i64" - } - ] - }, - { - "name": "getPrice", - "accounts": [ - { - "name": "price", - "isMut": false, - "isSigner": false - }, - { - "name": "dataAccount", - "isMut": true, - "isSigner": true - }, - { - "name": "payer", - "isMut": true, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [] - } - ], - "accounts": [ - { - "name": "dataAccount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "price", - "type": "u64" - } - ] - } - } - ] -}; diff --git a/packages/validator/fixtures/programs/psyoptions_american_instrument.so b/packages/validator/fixtures/programs/psyoptions_american_instrument.so index 7ae7d0d7e..10202db23 100755 Binary files a/packages/validator/fixtures/programs/psyoptions_american_instrument.so and b/packages/validator/fixtures/programs/psyoptions_american_instrument.so differ diff --git a/packages/validator/fixtures/programs/psyoptions_european_instrument.so b/packages/validator/fixtures/programs/psyoptions_european_instrument.so index 22a317648..3f3ba6ef2 100755 Binary files a/packages/validator/fixtures/programs/psyoptions_european_instrument.so and b/packages/validator/fixtures/programs/psyoptions_european_instrument.so differ diff --git a/packages/validator/fixtures/programs/rfq.so b/packages/validator/fixtures/programs/rfq.so index 45a542ecb..3cb4ab443 100755 Binary files a/packages/validator/fixtures/programs/rfq.so and b/packages/validator/fixtures/programs/rfq.so differ diff --git a/packages/validator/fixtures/programs/risk_engine.so b/packages/validator/fixtures/programs/risk_engine.so index 47dcd11ad..89b3baaa1 100755 Binary files a/packages/validator/fixtures/programs/risk_engine.so and b/packages/validator/fixtures/programs/risk_engine.so differ diff --git a/packages/validator/fixtures/programs/spot_instrument.so b/packages/validator/fixtures/programs/spot_instrument.so index 80c7b3653..5b3558f9c 100755 Binary files a/packages/validator/fixtures/programs/spot_instrument.so and b/packages/validator/fixtures/programs/spot_instrument.so differ diff --git a/packages/validator/fixtures/programs/vault_operator.so b/packages/validator/fixtures/programs/vault_operator.so new file mode 100755 index 000000000..0ee18cbc9 Binary files /dev/null and b/packages/validator/fixtures/programs/vault_operator.so differ diff --git a/packages/validator/fixtures/pubkey-naming.json b/packages/validator/fixtures/pubkey-naming.json new file mode 100644 index 000000000..b500e659a --- /dev/null +++ b/packages/validator/fixtures/pubkey-naming.json @@ -0,0 +1,48 @@ +{ + "7mbGUAWCyC2NRpx9LsGNyAQbcp9VdRunZrjVvFQUYMNY": "account-dao", + "5c1yzmnQg2bL8bdbUeBdgZ2RB5CAcjWN1yz6P1B8ccf8": "account-maker", + "EfotJvuqAdsPx4RFTNsnEABBuAyACNnjEKKR5zyE4HVx": "account-taker", + "6zyXbd44vYHhpC1gxZr2BhM6m7jThqsBphn2GD36bUi3": "hxro-print-trade-provider", + "P9Frq2k9Rx1ixDm71eaBcgN5xevWb7NNoPzZJrWWgC3": "hxro-print-trade-provider-config", + "FLaFgJ3Qa3bSGxUhiPCF3cgU1XhpTZKaSev7RUMbFYJZ": "mint-btc", + "3kg8xjMx3EWdAuGcm6gqgXFXbgQKk5b88N6AeAo26CbM": "mint-eth", + "3kePJGX9JBSMqqmLMBYZaJh6XksemDQA5EV2D1HR5w9L": "mint-sol", + "85HShAwuaknk3srchNcfmg4SZU9PsNzPvECnaqH62PDa": "mint-usd-collateral", + "9JgYBxL6w11XJ4xtvEicRhXGse6A1akPgZJaKjM1JnZB": "mint-usd-quote", + "HpmyVA3t3uNGgdx86AuwZww7gnAWB57vepnk3732vEr9": "psyoptions-american-instrument", + "4KC8MQi2zQGr7LhTCVTMhbKuP4KcpTmdZjxsDBWrTSVf": "psyoptions-european-instrument", + "FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo": "rfq", + "FrQXf9PvuwisbxSaGwXdFipxu8aCEvAXCMRLcPkX64Ct": "rfq-base-asset-btc", + "4U5MABcScyet6DtPRreD6auphbrybn6SJni1kNo2Bbk1": "rfq-base-asset-eth", + "4n58twpt2baDXrRoay8Go8kniKBWfEnG1zsenvUUsMyZ": "rfq-base-asset-sol", + "Fr2tKpuV7Jvo51wpBU4so7qv1AmUc4uBh62ZUAy5oevy": "rfq-collateral-info-dao", + "EiqZBnwa8b7tLvXhXSwTW4zqkcT9UXpZi5ADmsyCKpq4": "rfq-collateral-info-maker", + "7H6gn5kksiDYRCeMRnyFLd7j8AnaMHrV8UqopTgDucji": "rfq-collateral-info-taker", + "DYj8vXUBpTxrptvRm2j2sCNAo7xPmPDidyp925YKNPZ": "rfq-collateral-token-dao", + "HZoNij3PMue4MPar4SUydqENTF6CNDAC7CXN4HaX5gYr": "rfq-collateral-token-maker", + "HAWway8wsxpxT4Fds8HvNgS8QGkDLJQubjT9DK1VcdfF": "rfq-collateral-token-taker", + "Erqa3YWCcmzRRUbimK2WryFyGXW1xmBWDeCvo1tKmd3R": "rfq-mint-info-btc", + "BKf1HuUftLk5mLX9hHNbJdUPRapGEJaaedZK1NNzewhH": "rfq-mint-info-eth", + "7kuX93pjSAfd3nraBqdCHzrzwW3L1JM9no8SjEwuzYYt": "rfq-mint-info-sol", + "5Atpbyw3tBjjc8EYrbjE1a4FNqyLUszFGsNo3R5bR3y8": "rfq-mint-info-usd-quote", + "AinWDnZWiEkWrNGH9jbvS2JXaBFZwnRE5ssNGyop882L": "rfq-protocol", + "CtfTi4TstqJaxEh8giQ7kK8CKXsJyF9CuwdcVoqGrEi1": "risk-engine", + "BMXWVaYPVJ4G8g2MMJt51CDgjHHuoirPMvsTUadv3s3v": "spot-instrument", + "7J21igTMpQa18YueGJGNmp54m1VxsBHz4LEjiV6P28DJ": "spot-instrument-config", + "CBVMytnrNLSMZR4kRBwpp87iNeuexMehJFMTcizW86Yy": "token-account-btc-dao", + "24z1PN6o4swFd1ztLevjSbM6hnLd96wd65BVv3QkeCrU": "token-account-btc-maker", + "EB25yJhPe4X4ZWkDoeTm8HRpKgtqZGWKZAS58ifBkmGV": "token-account-btc-taker", + "4iXPAYibFSh8XgEAbmgbYhTbmRspGMykDzuk14kWwKa1": "token-account-eth-dao", + "AESoo2Gu9betexr8frYw3PueY623PFCCVgETBLejzzDW": "token-account-eth-maker", + "GHhfVCtkmxGLjCkrx9hW3rUSDpMimnxPEqGfMfNypHkZ": "token-account-eth-taker", + "JBPr3RLqLhiDh8wTn2QBz2ucQ3rPbuDYFGUAcDX36u45": "token-account-sol-dao", + "K9SGBfHNkEaZF9jcgWxfvT7ECUfSvpgH5D1rRSdhUPF": "token-account-sol-maker", + "2RY3MWhi5wdeqKKNnwVAMHgdZENePM4EaAzK7T56hrLy": "token-account-sol-taker", + "9WWe769YU4jMWy3CxypQZNmDDnmQQbyx2hPxtJqbLq79": "token-account-usd-collateral-dao", + "4BPzsvRcNt6SGnhLN3Z5y81yuEwnysRsGrJ14tBLjKi6": "token-account-usd-collateral-maker", + "7DTftDbxGPfDi6fA7ooGgEW4ELcmZDfrjXXJHbcKgpbt": "token-account-usd-collateral-taker", + "7t4TQvMCkpJj23t2XVWhcJZu5kPoyMvvTR4dDVPQ8WsA": "token-account-usd-quote-dao", + "G47NrfrvTpdiUc3m9jZn6x98qQYkuD6nYy98tmUMMuvn": "token-account-usd-quote-maker", + "7Q4CtjBBJJwXbuFstgsjpPKcupaRahgoAVPuDy6MjgQF": "token-account-usd-quote-taker", + "DftT8Q74YPqwrtJzy6g97XLzouG2YWaWZfRad6yK2GvA": "vault-operator" +} \ No newline at end of file diff --git a/packages/validator/helpers.ts b/packages/validator/helpers.ts index ec2ca9d04..e281b4c44 100644 --- a/packages/validator/helpers.ts +++ b/packages/validator/helpers.ts @@ -1,13 +1,15 @@ import { spawn, ChildProcessWithoutNullStreams } from 'child_process'; import fs from 'fs'; import path from 'path'; -import { Keypair } from '@solana/web3.js'; +import { Keypair, PublicKey } from '@solana/web3.js'; import * as rfq from '@convergence-rfq/rfq'; import * as riskEngine from '@convergence-rfq/risk-engine'; import * as spotInstrument from '@convergence-rfq/spot-instrument'; import * as psyoptionsEuropeanInstrument from '@convergence-rfq/psyoptions-european-instrument'; import * as psyoptionsAmericanInstrument from '@convergence-rfq/psyoptions-american-instrument'; +import * as hxroPrintTradeProvider from '@convergence-rfq/hxro-print-trade-provider'; +import * as vaultOperator from '@convergence-rfq/vault-operator'; export type ChildProccess = ChildProcessWithoutNullStreams; @@ -15,6 +17,7 @@ export const RPC_ENDPOINT = 'http://127.0.0.1:8899'; export const FIXTURES = path.join(__dirname, 'fixtures'); export const DEPS = path.join(__dirname, 'dependencies'); +export const HXRO_DEPS = path.join(DEPS, 'hxro'); const PSYOPTIONS_AMERICAN = 'R2y9ip6mxmWUj4pt54jP2hz2dgvMozy9VTSwMWE7evs'; const PSYOPTIONS_EURO = 'FASQhaZQT53W9eT9wWnPoBFw8xzZDey9TbMmJj6jCQTs'; @@ -22,6 +25,12 @@ const SWITCHBOARD_BTC_ORACLE = '8SXvChNYFhRq4EZuZvnhjrB3jJRQCv4k3P4W6hesH3Ee'; const PYTH_SOL_ORACLE = 'H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG'; const PYTH_ORACLE = 'FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH'; +const HXRO_DEX = 'FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL'; +const HXRO_AAOB = 'DchhQ6g8LyRCM5mnao1MAg3g9twfqBbDmUWgpQpFfn1b'; +const HXRO_INSTRUMENT = '8981bZYszfz1FrFVx7gcUm61RfawMoAHnURuERRJKdkq'; +const HXRO_FEES = '5T9gt3frWPAvu1hxEULbsKrP2WF4ggqSxCMqpJvtWXHV'; +export const HXRO_RISK_ENGINE = 'BVDTB61eHY7UnCb4ueatdaV4rctTzqfLAL6sQDeMNSHA'; + const getBaseArgs = () => [ '--account', SWITCHBOARD_BTC_ORACLE, @@ -36,11 +45,35 @@ const getBaseArgs = () => [ '--bpf-program', PSYOPTIONS_EURO, path.join(DEPS, 'euro_primitive.so'), - '--bpf-program', PYTH_ORACLE, path.join(DEPS, 'pseudo_pyth.so'), + '--bpf-program', + HXRO_DEX, + path.join( + HXRO_DEPS, + 'programs/dex_FUfpR31LmcP1VSbz5zDaM7nxnH55iBHkpwusgrnhaFjL.so' + ), + '--bpf-program', + HXRO_AAOB, + path.join( + HXRO_DEPS, + 'programs/aaob_DchhQ6g8LyRCM5mnao1MAg3g9twfqBbDmUWgpQpFfn1b.so' + ), + '--bpf-program', + HXRO_INSTRUMENT, + path.join( + HXRO_DEPS, + 'programs/instrument_8981bZYszfz1FrFVx7gcUm61RfawMoAHnURuERRJKdkq.so' + ), + '--bpf-program', + HXRO_FEES, + path.join(HXRO_DEPS, 'programs/constant_fees.so'), + '--bpf-program', + HXRO_RISK_ENGINE, + path.join(HXRO_DEPS, 'programs/noop_risk_engine.so'), + '--bpf-program', rfq.PROGRAM_ADDRESS, path.join(FIXTURES, 'programs/rfq.so'), @@ -56,6 +89,28 @@ const getBaseArgs = () => [ '--bpf-program', riskEngine.PROGRAM_ADDRESS, path.join(FIXTURES, 'programs/risk_engine.so'), + '--bpf-program', + hxroPrintTradeProvider.PROGRAM_ADDRESS, + path.join(FIXTURES, 'programs/hxro_print_trade_provider.so'), + '--bpf-program', + vaultOperator.PROGRAM_ADDRESS, + path.join(FIXTURES, 'programs/vault_operator.so'), + + '--account-dir', + path.join(FIXTURES, 'accounts'), + + '--account-dir', + path.join(HXRO_DEPS, 'accounts'), + + // squads fixtures + '--url', + 'm', + '-c', + 'BSTq9w3kZwNwpBXJEvTZz2G9ZTNyKBvoSeXMvwb4cNZr', + '-c', + 'SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf', + '-c', + 'Fy3YMJCvwbAXUgUM5b91ucUVA3jYzwWLHL3MwBqKsh8n', '--ledger', './test-ledger', @@ -82,7 +137,6 @@ export class Ctx { // Protocol protocol = getAccountPk('rfq-protocol'); - riskEngine = getAccountPk('risk-engine-config'); baseAsset = getAccountPk('rfq-base-asset-btc'); quoteRegisteredMint = getAccountPk('rfq-mint-info-usd-quote'); baseRegisteredMint = getAccountPk('rfq-mint-info-btc'); @@ -96,6 +150,11 @@ export class Ctx { // Pyth pythSOLOracle = getDepAccountPk('sol_30_oracle_pyth'); + + // Hxro + hxroMpg = new PublicKey(getHxroAccountPk('mpg')); + hxroTakerTrg = new PublicKey(getHxroAccountPk('taker-trg')); + hxroMakerTrg = new PublicKey(getHxroAccountPk('maker-trg')); } export const getAccountPk = (user: string): string => { @@ -112,6 +171,13 @@ export const getDepAccountPk = (user: string): string => { return json.pubkey; }; +export const getHxroAccountPk = (name: string): string => { + const f = path.join(HXRO_DEPS, 'accounts', name + '.json'); + const fileContent = fs.readFileSync(f, 'utf-8'); + const json = JSON.parse(fileContent); + return json.pubkey; +}; + export const getKpFile = (user: string): string => { return path.join(FIXTURES, 'keypairs', `${user}.json`); }; @@ -128,7 +194,6 @@ export const getUserKp = (user: string) => { export const spawnValidator = (done = () => {}): ChildProccess => { const args = getBaseArgs(); - args.push('--account-dir', path.join(FIXTURES, 'accounts')); const validator = spawn('solana-test-validator', args); validator.on('exit', process.exit); diff --git a/rollup.config.js b/rollup.config.js index 0db0809f6..f876ad9cb 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -81,7 +81,8 @@ const createConfig = (build, options) => { 'process.env.BROWSER': JSON.stringify(browser), }, }), - ...(bundle ? [json(), nodePolyfills()] : []), + json(), + ...(bundle ? [nodePolyfills()] : []), ...(minified ? [terser()] : []), ], onwarn(warning, rollupWarn) { diff --git a/yarn.lock b/yarn.lock index 7a4215f5f..76bbc185f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -29,10 +34,11 @@ tslib "^1.11.1" "@aws-sdk/types@^3.222.0": - version "3.310.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.310.0.tgz#b83a0580feb38b58417abb8b4ed3eae1a0cb7bc1" - integrity sha512-j8eamQJ7YcIhw7fneUfs8LYl3t01k4uHi4ZDmNRgtbmbmTTG3FZc2MotStZnp3nZB6vLiPF1o5aoJxWVvkzS6A== + version "3.515.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.515.0.tgz#ee97c887293211f1891bc1d8f0aaf354072b6002" + integrity sha512-B3gUpiMlpT6ERaLvZZ61D0RyrQPsFYDkCncLPVkZOKkCOoFU46zi1o6T5JcYiz8vkx1q9RGloQ5exh79s5pU/w== dependencies: + "@smithy/types" "^2.9.1" tslib "^2.5.0" "@aws-sdk/util-utf8-browser@^3.0.0": @@ -42,410 +48,292 @@ dependencies: tslib "^2.3.1" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" - integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== dependencies: - "@babel/highlight" "^7.18.6" + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.21.5": - version "7.21.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.7.tgz#61caffb60776e49a57ba61a88f02bedd8714f6bc" - integrity sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA== +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.3", "@babel/compat-data@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" + integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.17.10", "@babel/core@^7.7.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.5.tgz#92f753e8b9f96e15d4b398dbe2f25d1408c9c426" - integrity sha512-9M398B/QH5DlfCOTKDZT1ozXr0x8uBEeFd+dJraGUZGiaNpGCDVGCc14hZexsMblw3XxltJ+6kSvogp9J+5a9g== + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.9.tgz#b028820718000f267870822fec434820e9b1e4d1" + integrity sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.21.5" - "@babel/helper-compilation-targets" "^7.21.5" - "@babel/helper-module-transforms" "^7.21.5" - "@babel/helpers" "^7.21.5" - "@babel/parser" "^7.21.5" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.5" - "@babel/types" "^7.21.5" - convert-source-map "^1.7.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.9" + "@babel/parser" "^7.23.9" + "@babel/template" "^7.23.9" + "@babel/traverse" "^7.23.9" + "@babel/types" "^7.23.9" + convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" + json5 "^2.2.3" + semver "^6.3.1" -"@babel/generator@^7.21.5", "@babel/generator@^7.7.2": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.5.tgz#c0c0e5449504c7b7de8236d99338c3e2a340745f" - integrity sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w== +"@babel/generator@^7.23.6", "@babel/generator@^7.7.2": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" + integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== dependencies: - "@babel/types" "^7.21.5" + "@babel/types" "^7.23.6" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== +"@babel/helper-annotate-as-pure@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" + integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== dependencies: - "@babel/types" "^7.18.6" + "@babel/types" "^7.22.5" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.21.5.tgz#817f73b6c59726ab39f6ba18c234268a519e5abb" - integrity sha512-uNrjKztPLkUk7bpCNC0jEKDJzzkvel/W+HguzbN8krA+LPfC1CEobJEvAvGka2A/M+ViOqXdcRL0GqPUJSjx9g== +"@babel/helper-builder-binary-assignment-operator-visitor@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz#5426b109cf3ad47b91120f8328d8ab1be8b0b956" + integrity sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw== dependencies: - "@babel/types" "^7.21.5" + "@babel/types" "^7.22.15" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.5.tgz#631e6cc784c7b660417421349aac304c94115366" - integrity sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w== +"@babel/helper-compilation-targets@^7.22.15", "@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" + integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== dependencies: - "@babel/compat-data" "^7.21.5" - "@babel/helper-validator-option" "^7.21.0" - browserslist "^4.21.3" + "@babel/compat-data" "^7.23.5" + "@babel/helper-validator-option" "^7.23.5" + browserslist "^4.22.2" lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.5.tgz#09a259305467d2020bd2492119ee1c1bc55029e9" - integrity sha512-yNSEck9SuDvPTEUYm4BSXl6ZVC7yO5ZLEMAhG3v3zi7RDxyL/nQDemWWZmw4L0stPWwhpnznRRyJHPRcbXR2jw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-member-expression-to-functions" "^7.21.5" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.21.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/helper-split-export-declaration" "^7.18.6" - semver "^6.3.0" - -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.5.tgz#4ce6ffaf497a241aa6c62192416b273987a8daa3" - integrity sha512-1+DPMcln46eNAta/rPIqQYXYRGvQ/LRy6bRKnSt9Dzt/yLjNUbbsh+6yzD6fUHmtzc9kWvVnAhtcMSMyziHmUA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.23.6": + version "7.23.10" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.10.tgz#25d55fafbaea31fd0e723820bb6cc3df72edf7ea" + integrity sha512-2XpP2XhkXzgxecPNEEK8Vz8Asj9aRxt08oKOqtiZoqV2UGZ5T+EkyP9sXQ9nwMxBIG34a7jmasVqoMop7VdPUw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-member-expression-to-functions" "^7.23.0" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + semver "^6.3.1" + +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.15", "@babel/helper-create-regexp-features-plugin@^7.22.5": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz#5ee90093914ea09639b01c711db0d6775e558be1" + integrity sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" regexpu-core "^5.3.1" - semver "^6.3.0" + semver "^6.3.1" -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== +"@babel/helper-define-polyfill-provider@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz#465805b7361f461e86c680f1de21eaf88c25901b" + integrity sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q== dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" debug "^4.1.1" lodash.debounce "^4.0.8" resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz#c769afefd41d171836f7cb63e295bedf689d48ba" - integrity sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ== - -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" - integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== - dependencies: - "@babel/template" "^7.20.7" - "@babel/types" "^7.21.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.5.tgz#3b1a009af932e586af77c1030fba9ee0bde396c0" - integrity sha512-nIcGfgwpH2u4n9GG1HpStW5Ogx7x7ekiFHbjjFRKXbn5zUvqO9ZgotCO4x1aNbKn/x/xOUaXEhyNHCwtFCpxWg== - dependencies: - "@babel/types" "^7.21.5" - -"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.18.6", "@babel/helper-module-imports@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" - integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== - dependencies: - "@babel/types" "^7.21.4" - -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.5.tgz#d937c82e9af68d31ab49039136a222b17ac0b420" - integrity sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw== - dependencies: - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-module-imports" "^7.21.4" - "@babel/helper-simple-access" "^7.21.5" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.5" - "@babel/types" "^7.21.5" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.21.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz#345f2377d05a720a4e5ecfa39cbf4474a4daed56" - integrity sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg== -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== +"@babel/helper-define-polyfill-provider@^0.6.1": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.1.tgz#fadc63f0c2ff3c8d02ed905dcea747c5b0fb74fd" + integrity sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA== dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7", "@babel/helper-replace-supers@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.21.5.tgz#a6ad005ba1c7d9bc2973dfde05a1bba7065dde3c" - integrity sha512-/y7vBgsr9Idu4M6MprbOVUfH3vs7tsIfnVWv/Ml2xgwvyH6LTngdfbf5AdsKwkJy4zgy1X/kuNrEKvhhK28Yrg== - dependencies: - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-member-expression-to-functions" "^7.21.5" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.5" - "@babel/types" "^7.21.5" +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-simple-access@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz#d697a7971a5c39eac32c7e63c0921c06c8a249ee" - integrity sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg== +"@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/types" "^7.21.5" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: - "@babel/types" "^7.20.0" + "@babel/types" "^7.22.5" -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== +"@babel/helper-member-expression-to-functions@^7.22.15", "@babel/helper-member-expression-to-functions@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" + integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA== dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" - integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + "@babel/types" "^7.23.0" + +"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== + dependencies: + "@babel/types" "^7.22.15" -"@babel/helper-validator-option@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" - integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.5.tgz#5bac66e084d7a4d2d9696bdf0175a93f7fb63c08" - integrity sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.5" - "@babel/types" "^7.21.5" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" +"@babel/helper-module-transforms@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" + integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" + +"@babel/helper-optimise-call-expression@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" + integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== + +"@babel/helper-remap-async-to-generator@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz#7b68e1cb4fa964d2996fd063723fb48eca8498e0" + integrity sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-wrap-function" "^7.22.20" + +"@babel/helper-replace-supers@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793" + integrity sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-member-expression-to-functions" "^7.22.15" + "@babel/helper-optimise-call-expression" "^7.22.5" + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-skip-transparent-expression-wrappers@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" + integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" + integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== + +"@babel/helper-wrap-function@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz#15352b0b9bfb10fc9c76f79f6342c00e3411a569" + integrity sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw== + dependencies: + "@babel/helper-function-name" "^7.22.5" + "@babel/template" "^7.22.15" + "@babel/types" "^7.22.19" + +"@babel/helpers@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.9.tgz#c3e20bbe7f7a7e10cb9b178384b4affdf5995c7d" + integrity sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ== + dependencies: + "@babel/template" "^7.23.9" + "@babel/traverse" "^7.23.9" + "@babel/types" "^7.23.9" + +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@7.16.4": - version "7.16.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.4.tgz#d5f92f57cf2c74ffe9b37981c0e72fee7311372e" - integrity sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng== - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.4", "@babel/parser@^7.20.7", "@babel/parser@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.5.tgz#821bb520118fd25b982eaf8d37421cf5c64a312b" - integrity sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" - integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.7" - -"@babel/plugin-proposal-async-generator-functions@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" - integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.9.tgz#7b903b6149b0f8fa7ad564af646c4c38a77fc44b" + integrity sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA== -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" + integrity sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-proposal-optional-chaining@^7.20.7", "@babel/plugin-proposal-optional-chaining@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" - integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz#f6652bb16b94f8f9c20c50941e16e9756898dc5d" + integrity sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-transform-optional-chaining" "^7.23.3" -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz#516462a95d10a9618f197d39ad291a9b47ae1d7b" + integrity sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-proposal-private-property-in-object@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" - integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" +"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": + version "7.21.0-placeholder-for-preset-env.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" + integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -489,12 +377,19 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== +"@babel/plugin-syntax-import-assertions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz#9c05a7f592982aff1a2768260ad84bcd3f0c77fc" + integrity sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw== dependencies: - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-import-attributes@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz#992aee922cf04512461d7dae3ff6951b90a2dc06" + integrity sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -510,12 +405,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz#f264ed7bf40ffc9ec239edabc17a50c4f5b6fea2" - integrity sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ== +"@babel/plugin-syntax-jsx@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" + integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" @@ -573,306 +468,439 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.20.0", "@babel/plugin-syntax-typescript@^7.7.2": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz#2751948e9b7c6d771a8efa59340c15d4a2891ff8" - integrity sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA== +"@babel/plugin-syntax-typescript@^7.23.3", "@babel/plugin-syntax-typescript@^7.7.2": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz#24f460c85dbbc983cd2b9c4994178bcc01df958f" + integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-arrow-functions@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.21.5.tgz#9bb42a53de447936a57ba256fbf537fc312b6929" - integrity sha512-wb1mhwGOCaXHDTcsRYMKF9e5bbMgqwxtqa2Y1ifH96dXJPwbuLX9qHy3clhrxVqgMz7nyNXs8VkxdH8UBcjKqA== +"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" + integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== dependencies: - "@babel/helper-plugin-utils" "^7.21.5" + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-async-to-generator@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== +"@babel/plugin-transform-arrow-functions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz#94c6dcfd731af90f27a79509f9ab7fb2120fc38b" + integrity sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ== dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== +"@babel/plugin-transform-async-generator-functions@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz#9adaeb66fc9634a586c5df139c6240d41ed801ce" + integrity sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-transform-async-to-generator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz#d1f513c7a8a506d43f47df2bf25f9254b0b051fa" + integrity sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw== + dependencies: + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" + +"@babel/plugin-transform-block-scoped-functions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz#fe1177d715fb569663095e04f3598525d98e8c77" + integrity sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-block-scoping@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz#b2d38589531c6c80fbe25e6b58e763622d2d3cf5" + integrity sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-class-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz#35c377db11ca92a785a718b6aa4e3ed1eb65dc48" + integrity sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-class-static-block@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz#2a202c8787a8964dd11dfcedf994d36bfc844ab5" + integrity sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-block-scoping@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" - integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-classes@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" - integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" +"@babel/plugin-transform-classes@^7.23.8": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz#d08ae096c240347badd68cdf1b6d1624a6435d92" + integrity sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" + "@babel/helper-split-export-declaration" "^7.22.6" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.21.5.tgz#3a2d8bb771cd2ef1cd736435f6552fe502e11b44" - integrity sha512-TR653Ki3pAwxBxUe8srfF3e4Pe3FTA46uaNHYyQwIoM4oWKSoOZiDNyHJ0oIoDIUPSRQbQG7jzgVBX3FPVne1Q== +"@babel/plugin-transform-computed-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz#652e69561fcc9d2b50ba4f7ac7f60dcf65e86474" + integrity sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw== dependencies: - "@babel/helper-plugin-utils" "^7.21.5" - "@babel/template" "^7.20.7" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/template" "^7.22.15" -"@babel/plugin-transform-destructuring@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" - integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== +"@babel/plugin-transform-destructuring@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz#8c9ee68228b12ae3dff986e56ed1ba4f3c446311" + integrity sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== +"@babel/plugin-transform-dotall-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz#3f7af6054882ede89c378d0cf889b854a993da50" + integrity sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== +"@babel/plugin-transform-duplicate-keys@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz#664706ca0a5dfe8d066537f99032fc1dc8b720ce" + integrity sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== +"@babel/plugin-transform-dynamic-import@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz#c7629e7254011ac3630d47d7f34ddd40ca535143" + integrity sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-transform-for-of@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.5.tgz#e890032b535f5a2e237a18535f56a9fdaa7b83fc" - integrity sha512-nYWpjKW/7j/I/mZkGVgHJXh4bA1sfdFnJoOXwJuj4m3Q2EraO/8ZyrkCau9P5tbHQk01RMSt6KYLCsW7730SXQ== +"@babel/plugin-transform-exponentiation-operator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz#ea0d978f6b9232ba4722f3dbecdd18f450babd18" + integrity sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ== dependencies: - "@babel/helper-plugin-utils" "^7.21.5" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== +"@babel/plugin-transform-export-namespace-from@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz#084c7b25e9a5c8271e987a08cf85807b80283191" + integrity sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ== dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== +"@babel/plugin-transform-for-of@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz#81c37e24171b37b370ba6aaffa7ac86bcb46f94e" + integrity sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== +"@babel/plugin-transform-function-name@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz#8f424fcd862bf84cb9a1a6b42bc2f47ed630f8dc" + integrity sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-amd@^7.20.11": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" - integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== +"@babel/plugin-transform-json-strings@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz#a871d9b6bd171976efad2e43e694c961ffa3714d" + integrity sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg== dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-transform-modules-commonjs@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.5.tgz#d69fb947eed51af91de82e4708f676864e5e47bc" - integrity sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ== +"@babel/plugin-transform-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz#8214665f00506ead73de157eba233e7381f3beb4" + integrity sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ== dependencies: - "@babel/helper-module-transforms" "^7.21.5" - "@babel/helper-plugin-utils" "^7.21.5" - "@babel/helper-simple-access" "^7.21.5" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-systemjs@^7.20.11": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" - integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== +"@babel/plugin-transform-logical-assignment-operators@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz#e599f82c51d55fac725f62ce55d3a0886279ecb5" + integrity sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg== dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-identifier" "^7.19.1" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== +"@babel/plugin-transform-member-expression-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz#e37b3f0502289f477ac0e776b05a833d853cabcc" + integrity sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag== dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-named-capturing-groups-regex@^7.20.5": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" - integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== +"@babel/plugin-transform-modules-amd@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz#e19b55436a1416829df0a1afc495deedfae17f7d" + integrity sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== +"@babel/plugin-transform-modules-commonjs@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz#661ae831b9577e52be57dd8356b734f9700b53b4" + integrity sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== +"@babel/plugin-transform-modules-systemjs@^7.23.9": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.9.tgz#105d3ed46e4a21d257f83a2f9e2ee4203ceda6be" + integrity sha512-KDlPRM6sLo4o1FkiSlXoAa8edLXFsKKIda779fbLrvmeuc3itnjCtaO6RrtoaANsIJANj+Vk1zqbZIMhkCAHVw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" -"@babel/plugin-transform-parameters@^7.20.7", "@babel/plugin-transform-parameters@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz#18fc4e797cf6d6d972cb8c411dbe8a809fa157db" - integrity sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ== +"@babel/plugin-transform-modules-umd@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz#5d4395fccd071dfefe6585a4411aa7d6b7d769e9" + integrity sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== +"@babel/plugin-transform-named-capturing-groups-regex@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz#67fe18ee8ce02d57c855185e27e3dc959b2e991f" + integrity sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-regexp-features-plugin" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-regenerator@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.21.5.tgz#576c62f9923f94bcb1c855adc53561fd7913724e" - integrity sha512-ZoYBKDb6LyMi5yCsByQ5jmXsHAQDDYeexT1Szvlmui+lADvfSecr5Dxd/PkrTC3pAD182Fcju1VQkB4oCp9M+w== +"@babel/plugin-transform-new-target@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz#5491bb78ed6ac87e990957cea367eab781c4d980" + integrity sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ== dependencies: - "@babel/helper-plugin-utils" "^7.21.5" - regenerator-transform "^0.15.1" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== +"@babel/plugin-transform-nullish-coalescing-operator@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz#45556aad123fc6e52189ea749e33ce090637346e" + integrity sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== +"@babel/plugin-transform-numeric-separator@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz#03d08e3691e405804ecdd19dd278a40cca531f29" + integrity sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-transform-spread@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" - integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== +"@babel/plugin-transform-object-rest-spread@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz#2b9c2d26bf62710460bdc0d1730d4f1048361b83" + integrity sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" + "@babel/compat-data" "^7.23.3" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.23.3" -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== +"@babel/plugin-transform-object-super@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz#81fdb636dcb306dd2e4e8fd80db5b2362ed2ebcd" + integrity sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== +"@babel/plugin-transform-optional-catch-binding@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz#318066de6dacce7d92fa244ae475aa8d91778017" + integrity sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== +"@babel/plugin-transform-optional-chaining@^7.23.3", "@babel/plugin-transform-optional-chaining@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz#6acf61203bdfc4de9d4e52e64490aeb3e52bd017" + integrity sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-transform-typescript@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.21.3.tgz#316c5be579856ea890a57ebc5116c5d064658f2b" - integrity sha512-RQxPz6Iqt8T0uw/WsJNReuBpWpBqs/n7mNo18sKLoTbMp+UrEekhH+pKSVC7gWz+DNjo9gryfV8YzCiT45RgMw== +"@babel/plugin-transform-parameters@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz#83ef5d1baf4b1072fa6e54b2b0999a7b2527e2af" + integrity sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw== dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-typescript" "^7.20.0" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-unicode-escapes@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.21.5.tgz#1e55ed6195259b0e9061d81f5ef45a9b009fb7f2" - integrity sha512-LYm/gTOwZqsYohlvFUe/8Tujz75LqqVC2w+2qPHLR+WyWHGCZPN1KBpJCJn+4Bk4gOkQy/IXKIge6az5MqwlOg== +"@babel/plugin-transform-private-methods@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz#b2d7a3c97e278bfe59137a978d53b2c2e038c0e4" + integrity sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g== dependencies: - "@babel/helper-plugin-utils" "^7.21.5" + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== +"@babel/plugin-transform-private-property-in-object@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz#3ec711d05d6608fd173d9b8de39872d8dbf68bf5" + integrity sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + +"@babel/plugin-transform-property-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz#54518f14ac4755d22b92162e4a852d308a560875" + integrity sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-regenerator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz#141afd4a2057298602069fce7f2dc5173e6c561c" + integrity sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + regenerator-transform "^0.15.2" + +"@babel/plugin-transform-reserved-words@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz#4130dcee12bd3dd5705c587947eb715da12efac8" + integrity sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-shorthand-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz#97d82a39b0e0c24f8a981568a8ed851745f59210" + integrity sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-spread@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz#41d17aacb12bde55168403c6f2d6bdca563d362c" + integrity sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + +"@babel/plugin-transform-sticky-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz#dec45588ab4a723cb579c609b294a3d1bd22ff04" + integrity sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-template-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz#5f0f028eb14e50b5d0f76be57f90045757539d07" + integrity sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-typeof-symbol@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz#9dfab97acc87495c0c449014eb9c547d8966bca4" + integrity sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-typescript@^7.23.3": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz#aa36a94e5da8d94339ae3a4e22d40ed287feb34c" + integrity sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.23.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-typescript" "^7.23.3" + +"@babel/plugin-transform-unicode-escapes@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz#1f66d16cab01fab98d784867d24f70c1ca65b925" + integrity sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-property-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz#19e234129e5ffa7205010feec0d94c251083d7ad" + integrity sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz#26897708d8f42654ca4ce1b73e96140fbad879dc" + integrity sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-sets-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz#4fb6f0a719c2c5859d11f6b55a050cc987f3799e" + integrity sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/preset-env@^7.17.10": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.21.5.tgz#db2089d99efd2297716f018aeead815ac3decffb" - integrity sha512-wH00QnTTldTbf/IefEVyChtRdw5RJvODT/Vb4Vcxq1AZvtXj6T0YeX0cAcXhI6/BdGuiP3GcNIL4OQbI2DVNxg== - dependencies: - "@babel/compat-data" "^7.21.5" - "@babel/helper-compilation-targets" "^7.21.5" - "@babel/helper-plugin-utils" "^7.21.5" - "@babel/helper-validator-option" "^7.21.0" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.20.7" - "@babel/plugin-proposal-async-generator-functions" "^7.20.7" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.21.0" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.20.7" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.7" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.21.0" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.21.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.9.tgz#beace3b7994560ed6bf78e4ae2073dff45387669" + integrity sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.23.5" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.7" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" + "@babel/plugin-syntax-import-assertions" "^7.23.3" + "@babel/plugin-syntax-import-attributes" "^7.23.3" "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" @@ -883,119 +911,126 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.21.5" - "@babel/plugin-transform-async-to-generator" "^7.20.7" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.21.0" - "@babel/plugin-transform-classes" "^7.21.0" - "@babel/plugin-transform-computed-properties" "^7.21.5" - "@babel/plugin-transform-destructuring" "^7.21.3" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.21.5" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.20.11" - "@babel/plugin-transform-modules-commonjs" "^7.21.5" - "@babel/plugin-transform-modules-systemjs" "^7.20.11" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.20.5" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.21.3" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.21.5" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.20.7" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.21.5" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.21.5" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.23.3" + "@babel/plugin-transform-async-generator-functions" "^7.23.9" + "@babel/plugin-transform-async-to-generator" "^7.23.3" + "@babel/plugin-transform-block-scoped-functions" "^7.23.3" + "@babel/plugin-transform-block-scoping" "^7.23.4" + "@babel/plugin-transform-class-properties" "^7.23.3" + "@babel/plugin-transform-class-static-block" "^7.23.4" + "@babel/plugin-transform-classes" "^7.23.8" + "@babel/plugin-transform-computed-properties" "^7.23.3" + "@babel/plugin-transform-destructuring" "^7.23.3" + "@babel/plugin-transform-dotall-regex" "^7.23.3" + "@babel/plugin-transform-duplicate-keys" "^7.23.3" + "@babel/plugin-transform-dynamic-import" "^7.23.4" + "@babel/plugin-transform-exponentiation-operator" "^7.23.3" + "@babel/plugin-transform-export-namespace-from" "^7.23.4" + "@babel/plugin-transform-for-of" "^7.23.6" + "@babel/plugin-transform-function-name" "^7.23.3" + "@babel/plugin-transform-json-strings" "^7.23.4" + "@babel/plugin-transform-literals" "^7.23.3" + "@babel/plugin-transform-logical-assignment-operators" "^7.23.4" + "@babel/plugin-transform-member-expression-literals" "^7.23.3" + "@babel/plugin-transform-modules-amd" "^7.23.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.3" + "@babel/plugin-transform-modules-systemjs" "^7.23.9" + "@babel/plugin-transform-modules-umd" "^7.23.3" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" + "@babel/plugin-transform-new-target" "^7.23.3" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.23.4" + "@babel/plugin-transform-numeric-separator" "^7.23.4" + "@babel/plugin-transform-object-rest-spread" "^7.23.4" + "@babel/plugin-transform-object-super" "^7.23.3" + "@babel/plugin-transform-optional-catch-binding" "^7.23.4" + "@babel/plugin-transform-optional-chaining" "^7.23.4" + "@babel/plugin-transform-parameters" "^7.23.3" + "@babel/plugin-transform-private-methods" "^7.23.3" + "@babel/plugin-transform-private-property-in-object" "^7.23.4" + "@babel/plugin-transform-property-literals" "^7.23.3" + "@babel/plugin-transform-regenerator" "^7.23.3" + "@babel/plugin-transform-reserved-words" "^7.23.3" + "@babel/plugin-transform-shorthand-properties" "^7.23.3" + "@babel/plugin-transform-spread" "^7.23.3" + "@babel/plugin-transform-sticky-regex" "^7.23.3" + "@babel/plugin-transform-template-literals" "^7.23.3" + "@babel/plugin-transform-typeof-symbol" "^7.23.3" + "@babel/plugin-transform-unicode-escapes" "^7.23.3" + "@babel/plugin-transform-unicode-property-regex" "^7.23.3" + "@babel/plugin-transform-unicode-regex" "^7.23.3" + "@babel/plugin-transform-unicode-sets-regex" "^7.23.3" + "@babel/preset-modules" "0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2 "^0.4.8" + babel-plugin-polyfill-corejs3 "^0.9.0" + babel-plugin-polyfill-regenerator "^0.5.5" + core-js-compat "^3.31.0" + semver "^6.3.1" + +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" "@babel/types" "^7.4.4" esutils "^2.0.2" "@babel/preset-typescript@^7.16.7": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.21.5.tgz#68292c884b0e26070b4d66b202072d391358395f" - integrity sha512-iqe3sETat5EOrORXiQ6rWfoOg2y68Cs75B9wNxdPW4kixJxh7aXQE1KPdWLDniC24T/6dSnguF33W9j/ZZQcmA== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz#14534b34ed5b6d435aa05f1ae1c5e7adcc01d913" + integrity sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ== dependencies: - "@babel/helper-plugin-utils" "^7.21.5" - "@babel/helper-validator-option" "^7.21.0" - "@babel/plugin-syntax-jsx" "^7.21.4" - "@babel/plugin-transform-modules-commonjs" "^7.21.5" - "@babel/plugin-transform-typescript" "^7.21.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.22.15" + "@babel/plugin-syntax-jsx" "^7.23.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.3" + "@babel/plugin-transform-typescript" "^7.23.3" "@babel/regjsgen@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.10.5", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" - integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/runtime@^7.23.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.6.tgz#c05e610dc228855dc92ef1b53d07389ed8ab521d" - integrity sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ== +"@babel/runtime@^7.10.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.1", "@babel/runtime@^7.23.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" + integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw== dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.3.3": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/traverse@^7.12.5", "@babel/traverse@^7.20.5", "@babel/traverse@^7.21.5", "@babel/traverse@^7.7.2": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.5.tgz#ad22361d352a5154b498299d523cf72998a4b133" - integrity sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw== - dependencies: - "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.21.5" - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.5" - "@babel/types" "^7.21.5" - debug "^4.1.0" +"@babel/template@^7.22.15", "@babel/template@^7.23.9", "@babel/template@^7.3.3": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.23.9.tgz#f881d0487cba2828d3259dcb9ef5005a9731011a" + integrity sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/parser" "^7.23.9" + "@babel/types" "^7.23.9" + +"@babel/traverse@^7.23.2", "@babel/traverse@^7.23.9", "@babel/traverse@^7.7.2": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.9.tgz#2f9d6aead6b564669394c5ce0f9302bb65b9d950" + integrity sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.9" + "@babel/types" "^7.23.9" + debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6" - integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.23.9", "@babel/types@^7.3.3", "@babel/types@^7.4.4": + version "7.23.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.9.tgz#1dd7b59a9a2b5c87f8b41e52770b5ecbf492e002" + integrity sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q== dependencies: - "@babel/helper-string-parser" "^7.21.5" - "@babel/helper-validator-identifier" "^7.19.1" + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -1003,6 +1038,17 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@bonfida/aaob@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@bonfida/aaob/-/aaob-0.0.3.tgz#9157aa3aab32abc5e78294801317f53481fa8654" + integrity sha512-YLac//38o470VFUOqDnXXIbouJ61cJK6OgylE1sBdm4zvBNsf2/xu2DthhsnLvphIVqY5KLK+VB6iOgtG4olmw== + dependencies: + "@solana/spl-token" "0.1.5" + "@solana/web3.js" "^1.15.0" + bn.js "^5.1.3" + borsh "^0.6.0" + bs58 "4.0.1" + "@bundlr-network/client@^0.8.8": version "0.8.9" resolved "https://registry.yarnpkg.com/@bundlr-network/client/-/client-0.8.9.tgz#58e969a5d80f8d25d212d46bb7a060730a3c1736" @@ -1028,16 +1074,16 @@ near-api-js "^0.44.2" near-seed-phrase "^0.2.0" -"@changesets/apply-release-plan@^6.1.3": - version "6.1.3" - resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-6.1.3.tgz#3bcc0bd57ba00d50d20df7d0141f1a9b2134eaf7" - integrity sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg== +"@changesets/apply-release-plan@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-7.0.0.tgz#ce3c3dfc5720550a5d592b54ad2f411f816ec5ff" + integrity sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/config" "^2.3.0" - "@changesets/get-version-range-type" "^0.3.2" - "@changesets/git" "^2.0.0" - "@changesets/types" "^5.2.1" + "@changesets/config" "^3.0.0" + "@changesets/get-version-range-type" "^0.4.0" + "@changesets/git" "^3.0.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" detect-indent "^6.0.0" fs-extra "^7.0.1" @@ -1045,164 +1091,163 @@ outdent "^0.5.0" prettier "^2.7.1" resolve-from "^5.0.0" - semver "^5.4.1" + semver "^7.5.3" -"@changesets/assemble-release-plan@^5.2.3": - version "5.2.3" - resolved "https://registry.yarnpkg.com/@changesets/assemble-release-plan/-/assemble-release-plan-5.2.3.tgz#5ce6191c6e193d40b566a7b0e01690cfb106f4db" - integrity sha512-g7EVZCmnWz3zMBAdrcKhid4hkHT+Ft1n0mLussFMcB1dE2zCuwcvGoy9ec3yOgPGF4hoMtgHaMIk3T3TBdvU9g== +"@changesets/assemble-release-plan@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.0.tgz#c69969b4bef7c32a8544b6941d1053260ca47e05" + integrity sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.3.5" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/get-dependents-graph" "^2.0.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" - semver "^5.4.1" + semver "^7.5.3" -"@changesets/changelog-git@^0.1.14": - version "0.1.14" - resolved "https://registry.yarnpkg.com/@changesets/changelog-git/-/changelog-git-0.1.14.tgz#852caa7727dcf91497c131d05bc2cd6248532ada" - integrity sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA== +"@changesets/changelog-git@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@changesets/changelog-git/-/changelog-git-0.2.0.tgz#1f3de11becafff5a38ebe295038a602403c93a86" + integrity sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ== dependencies: - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" "@changesets/cli@^2.24.4": - version "2.26.1" - resolved "https://registry.yarnpkg.com/@changesets/cli/-/cli-2.26.1.tgz#2d10858d7d32314a524e383111c96d831eb0402f" - integrity sha512-XnTa+b51vt057fyAudvDKGB0Sh72xutQZNAdXkCqPBKO2zvs2yYZx5hFZj1u9cbtpwM6Sxtcr02/FQJfZOzemQ== + version "2.27.1" + resolved "https://registry.yarnpkg.com/@changesets/cli/-/cli-2.27.1.tgz#abce480fd30b9abbe2cfcf07d5d668c364ce2804" + integrity sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/apply-release-plan" "^6.1.3" - "@changesets/assemble-release-plan" "^5.2.3" - "@changesets/changelog-git" "^0.1.14" - "@changesets/config" "^2.3.0" - "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.3.5" - "@changesets/get-release-plan" "^3.0.16" - "@changesets/git" "^2.0.0" - "@changesets/logger" "^0.0.5" - "@changesets/pre" "^1.0.14" - "@changesets/read" "^0.5.9" - "@changesets/types" "^5.2.1" - "@changesets/write" "^0.2.3" + "@changesets/apply-release-plan" "^7.0.0" + "@changesets/assemble-release-plan" "^6.0.0" + "@changesets/changelog-git" "^0.2.0" + "@changesets/config" "^3.0.0" + "@changesets/errors" "^0.2.0" + "@changesets/get-dependents-graph" "^2.0.0" + "@changesets/get-release-plan" "^4.0.0" + "@changesets/git" "^3.0.0" + "@changesets/logger" "^0.1.0" + "@changesets/pre" "^2.0.0" + "@changesets/read" "^0.6.0" + "@changesets/types" "^6.0.0" + "@changesets/write" "^0.3.0" "@manypkg/get-packages" "^1.1.3" - "@types/is-ci" "^3.0.0" - "@types/semver" "^6.0.0" + "@types/semver" "^7.5.0" ansi-colors "^4.1.3" chalk "^2.1.0" + ci-info "^3.7.0" enquirer "^2.3.0" external-editor "^3.1.0" fs-extra "^7.0.1" human-id "^1.0.2" - is-ci "^3.0.1" meow "^6.0.0" outdent "^0.5.0" p-limit "^2.2.0" preferred-pm "^3.0.0" resolve-from "^5.0.0" - semver "^5.4.1" + semver "^7.5.3" spawndamnit "^2.0.0" term-size "^2.1.0" tty-table "^4.1.5" -"@changesets/config@^2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@changesets/config/-/config-2.3.0.tgz#bff074d6492fa772cee139f9a04efa4cd56445bb" - integrity sha512-EgP/px6mhCx8QeaMAvWtRrgyxW08k/Bx2tpGT+M84jEdX37v3VKfh4Cz1BkwrYKuMV2HZKeHOh8sHvja/HcXfQ== +"@changesets/config@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@changesets/config/-/config-3.0.0.tgz#a1a1cafc77134b117b4a9266459c84fdd360a6be" + integrity sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA== dependencies: - "@changesets/errors" "^0.1.4" - "@changesets/get-dependents-graph" "^1.3.5" - "@changesets/logger" "^0.0.5" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/get-dependents-graph" "^2.0.0" + "@changesets/logger" "^0.1.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" fs-extra "^7.0.1" micromatch "^4.0.2" -"@changesets/errors@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@changesets/errors/-/errors-0.1.4.tgz#f79851746c43679a66b383fdff4c012f480f480d" - integrity sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q== +"@changesets/errors@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@changesets/errors/-/errors-0.2.0.tgz#3c545e802b0f053389cadcf0ed54e5636ff9026a" + integrity sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow== dependencies: extendable-error "^0.1.5" -"@changesets/get-dependents-graph@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@changesets/get-dependents-graph/-/get-dependents-graph-1.3.5.tgz#f94c6672d2f9a87aa35512eea74550585ba41c21" - integrity sha512-w1eEvnWlbVDIY8mWXqWuYE9oKhvIaBhzqzo4ITSJY9hgoqQ3RoBqwlcAzg11qHxv/b8ReDWnMrpjpKrW6m1ZTA== +"@changesets/get-dependents-graph@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@changesets/get-dependents-graph/-/get-dependents-graph-2.0.0.tgz#97f0cc9fbec436e0d6ab95a6a59c08acf21ac714" + integrity sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA== dependencies: - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" chalk "^2.1.0" fs-extra "^7.0.1" - semver "^5.4.1" + semver "^7.5.3" -"@changesets/get-release-plan@^3.0.16": - version "3.0.16" - resolved "https://registry.yarnpkg.com/@changesets/get-release-plan/-/get-release-plan-3.0.16.tgz#5d9cfc4ffda02c496ef0fde407210de8e3a0fb19" - integrity sha512-OpP9QILpBp1bY2YNIKFzwigKh7Qe9KizRsZomzLe6pK8IUo8onkAAVUD8+JRKSr8R7d4+JRuQrfSSNlEwKyPYg== +"@changesets/get-release-plan@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@changesets/get-release-plan/-/get-release-plan-4.0.0.tgz#8cb057da90a08796a335dfd18073234d33902069" + integrity sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/assemble-release-plan" "^5.2.3" - "@changesets/config" "^2.3.0" - "@changesets/pre" "^1.0.14" - "@changesets/read" "^0.5.9" - "@changesets/types" "^5.2.1" + "@changesets/assemble-release-plan" "^6.0.0" + "@changesets/config" "^3.0.0" + "@changesets/pre" "^2.0.0" + "@changesets/read" "^0.6.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" -"@changesets/get-version-range-type@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz#8131a99035edd11aa7a44c341cbb05e668618c67" - integrity sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg== +"@changesets/get-version-range-type@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz#429a90410eefef4368502c41c63413e291740bf5" + integrity sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ== -"@changesets/git@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@changesets/git/-/git-2.0.0.tgz#8de57649baf13a86eb669a25fa51bcad5cea517f" - integrity sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A== +"@changesets/git@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@changesets/git/-/git-3.0.0.tgz#e71d003752a97bc27988db6d410e0038a4a88055" + integrity sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/errors" "^0.1.4" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" is-subdir "^1.1.1" micromatch "^4.0.2" spawndamnit "^2.0.0" -"@changesets/logger@^0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@changesets/logger/-/logger-0.0.5.tgz#68305dd5a643e336be16a2369cb17cdd8ed37d4c" - integrity sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw== +"@changesets/logger@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@changesets/logger/-/logger-0.1.0.tgz#2d2a58536c5beeeaef52ab464931d99fcf24f17b" + integrity sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g== dependencies: chalk "^2.1.0" -"@changesets/parse@^0.3.16": - version "0.3.16" - resolved "https://registry.yarnpkg.com/@changesets/parse/-/parse-0.3.16.tgz#f8337b70aeb476dc81745ab3294022909bc4a84a" - integrity sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg== +"@changesets/parse@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@changesets/parse/-/parse-0.4.0.tgz#5cabbd9844b3b213cb83f5edb5768454c70dd2b4" + integrity sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw== dependencies: - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" js-yaml "^3.13.1" -"@changesets/pre@^1.0.14": - version "1.0.14" - resolved "https://registry.yarnpkg.com/@changesets/pre/-/pre-1.0.14.tgz#9df73999a4d15804da7381358d77bb37b00ddf0f" - integrity sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ== +"@changesets/pre@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@changesets/pre/-/pre-2.0.0.tgz#ad3edf3d6ac287991d7ef5e26cf280d03c9e3764" + integrity sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/errors" "^0.1.4" - "@changesets/types" "^5.2.1" + "@changesets/errors" "^0.2.0" + "@changesets/types" "^6.0.0" "@manypkg/get-packages" "^1.1.3" fs-extra "^7.0.1" -"@changesets/read@^0.5.9": - version "0.5.9" - resolved "https://registry.yarnpkg.com/@changesets/read/-/read-0.5.9.tgz#a1b63a82b8e9409738d7a0f9cc39b6d7c28cbab0" - integrity sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ== +"@changesets/read@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@changesets/read/-/read-0.6.0.tgz#27e13b58d0b0eb3b0a5cba48a3f4f71f05ef4610" + integrity sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/git" "^2.0.0" - "@changesets/logger" "^0.0.5" - "@changesets/parse" "^0.3.16" - "@changesets/types" "^5.2.1" + "@changesets/git" "^3.0.0" + "@changesets/logger" "^0.1.0" + "@changesets/parse" "^0.4.0" + "@changesets/types" "^6.0.0" chalk "^2.1.0" fs-extra "^7.0.1" p-filter "^2.1.0" @@ -1212,18 +1257,18 @@ resolved "https://registry.yarnpkg.com/@changesets/types/-/types-4.1.0.tgz#fb8f7ca2324fd54954824e864f9a61a82cb78fe0" integrity sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw== -"@changesets/types@^5.2.1": - version "5.2.1" - resolved "https://registry.yarnpkg.com/@changesets/types/-/types-5.2.1.tgz#a228c48004aa8a93bce4be2d1d31527ef3bf21f6" - integrity sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg== +"@changesets/types@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@changesets/types/-/types-6.0.0.tgz#e46abda9890610dd1fbe1617730173d2267544bd" + integrity sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ== -"@changesets/write@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@changesets/write/-/write-0.2.3.tgz#baf6be8ada2a67b9aba608e251bfea4fdc40bc63" - integrity sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw== +"@changesets/write@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@changesets/write/-/write-0.3.0.tgz#c6c5bc390cce4031da20eab8a4ca2d71453a1985" + integrity sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw== dependencies: "@babel/runtime" "^7.20.1" - "@changesets/types" "^5.2.1" + "@changesets/types" "^6.0.0" fs-extra "^7.0.1" human-id "^1.0.2" prettier "^2.7.1" @@ -1247,10 +1292,10 @@ bn.js "^5.2.0" debug "^4.3.3" -"@convergence-rfq/psyoptions-american-instrument@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@convergence-rfq/psyoptions-american-instrument/-/psyoptions-american-instrument-2.3.1.tgz#24c24675c3341f85b37693e80eab1fe732c93b34" - integrity sha512-Faml7py1HDKXAImBRwOq+iYsMsZbrcZS4GritvmC4EMHIbLCjKvWv2LyHmQPQ8MtR9VxT3Y2RQFEZ9UrGhniNg== +"@convergence-rfq/hxro-print-trade-provider@3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@convergence-rfq/hxro-print-trade-provider/-/hxro-print-trade-provider-3.11.0.tgz#ef2bb82c717a64e1a697354a460abfc086c03f47" + integrity sha512-/kw2xA5Ac3KHO3S7J1qUGuK2uZjy56DDka6vyqNCGH2nlVuPDcJDtmRJyHxLvIaBB8hxLNhc4LaxfBZI2bAiUg== dependencies: "@convergence-rfq/beet" "^0.7.10" "@convergence-rfq/beet-solana" "^0.4.11" @@ -1258,10 +1303,10 @@ "@solana/web3.js" "^1.56.2" bn.js "^5.2.0" -"@convergence-rfq/psyoptions-european-instrument@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@convergence-rfq/psyoptions-european-instrument/-/psyoptions-european-instrument-2.3.1.tgz#2a4350673a9635cc69cebd05a6d22cd66f190f5a" - integrity sha512-SABqvaSOsofhnABh/sjFnP4fmS093hypRfDyOuT/H3TUVDB76yho74D2W6+GBu/KoIF3eraYTwyTj6HvPK2osw== +"@convergence-rfq/psyoptions-american-instrument@3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@convergence-rfq/psyoptions-american-instrument/-/psyoptions-american-instrument-3.11.0.tgz#e36337e5f677412a04499cf21c04695c0e9d3976" + integrity sha512-YVgpWIKH8XMJ3jbcB4r++h77pedD90QJZ6XYg5ef30wj7JCBZTWzvTcu8Ed35xwfT8RfR9slKs1bHz1iAblx7g== dependencies: "@convergence-rfq/beet" "^0.7.10" "@convergence-rfq/beet-solana" "^0.4.11" @@ -1269,10 +1314,10 @@ "@solana/web3.js" "^1.56.2" bn.js "^5.2.0" -"@convergence-rfq/rfq@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@convergence-rfq/rfq/-/rfq-2.3.1.tgz#cc474fdd354e85993c19b848cefd9990de1a4441" - integrity sha512-X+ZKP5fIbolaTChwmesTkQXCVPMeaDvP2YDBjdoj3lOqNRaEjfQT7s/Hc8WKPiTAoC/jsqCfHXL+D+/SSdzmCQ== +"@convergence-rfq/psyoptions-european-instrument@3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@convergence-rfq/psyoptions-european-instrument/-/psyoptions-european-instrument-3.11.0.tgz#d45ec60af04d73912419362be455de18718e0f21" + integrity sha512-tFkF6yR/AwRAx69W7ZFzq6MZS3vMR7eRvzLOwpQ7eM4mWbB3srQ8Dhsr/7HicrSgaXY94CYGHf9vK49OysM3Iw== dependencies: "@convergence-rfq/beet" "^0.7.10" "@convergence-rfq/beet-solana" "^0.4.11" @@ -1280,10 +1325,10 @@ "@solana/web3.js" "^1.56.2" bn.js "^5.2.0" -"@convergence-rfq/risk-engine@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@convergence-rfq/risk-engine/-/risk-engine-2.3.1.tgz#f71f334274f62873b0ea712e934cdb3391215374" - integrity sha512-5iVohA0EYKZhQq+Vm52R7LDrv8gyt+hrVy9+FiOguYfuPYQ8KRa+Y5DzRngUzZCo7ZoMozYil6FOTeZBSbWTvw== +"@convergence-rfq/rfq@3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@convergence-rfq/rfq/-/rfq-3.11.0.tgz#c7c0e1db5366bcfc388e2fdea048ef578cd74b70" + integrity sha512-bXF2mejleAhdnt81vCpgi9bsxdLWZzPP6EDoQ4WhKFK4kSj08whUOMqbQKGRzezp5nHhwsctKgj4K92p2LAe9w== dependencies: "@convergence-rfq/beet" "^0.7.10" "@convergence-rfq/beet-solana" "^0.4.11" @@ -1291,10 +1336,32 @@ "@solana/web3.js" "^1.56.2" bn.js "^5.2.0" -"@convergence-rfq/spot-instrument@2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@convergence-rfq/spot-instrument/-/spot-instrument-2.3.1.tgz#3bf05026de79b33fb02c5e0d8be837879b296519" - integrity sha512-QTwR54ojJzuHuteD99AiUUsn8QTmFFiG5/I9ZNLjh1o0Tv2Yajh/tXmF/Txzzb9clDIYY2rU1FG51VBZVHA0yw== +"@convergence-rfq/risk-engine@3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@convergence-rfq/risk-engine/-/risk-engine-3.11.0.tgz#ec2a7d0781bcde02ffc703eb47bbf7b6e95004fb" + integrity sha512-XjTLsCDX37Ats+jZAIW56jzJ+drDX/ED0w9mJc3RYh09TMD3UXN3eZAHD/Y+WmJSgn+OAVi3/qaQNSOE1ZFLEA== + dependencies: + "@convergence-rfq/beet" "^0.7.10" + "@convergence-rfq/beet-solana" "^0.4.11" + "@solana/spl-token" "^0.3.5" + "@solana/web3.js" "^1.56.2" + bn.js "^5.2.0" + +"@convergence-rfq/spot-instrument@3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@convergence-rfq/spot-instrument/-/spot-instrument-3.11.0.tgz#2f020b9874e154f9eaedce00c181f847bb29f1c0" + integrity sha512-nnN1AicLy6vvTycXmAfVtAKjMWSspGt/wFm0w2EuCTlFPodhE7+IUVq/8F2hTi/LPM3StC8xxUJm5Vtf+ibBeQ== + dependencies: + "@convergence-rfq/beet" "^0.7.10" + "@convergence-rfq/beet-solana" "^0.4.11" + "@solana/spl-token" "^0.3.5" + "@solana/web3.js" "^1.56.2" + bn.js "^5.2.0" + +"@convergence-rfq/vault-operator@^3.11.0": + version "3.11.0" + resolved "https://registry.yarnpkg.com/@convergence-rfq/vault-operator/-/vault-operator-3.11.0.tgz#a47624c1e7ba79a99fc6d358f5f347d06e55fa91" + integrity sha512-QFEXBM8yGC41Yv7ENBpUFe73QXIJLpimZrpdHeBrlkRCkOseFNHMS4l1gjgBA+IKcx0bgkRP2hsbZ6WcxDFlzA== dependencies: "@convergence-rfq/beet" "^0.7.10" "@convergence-rfq/beet-solana" "^0.4.11" @@ -1302,6 +1369,47 @@ "@solana/web3.js" "^1.56.2" bn.js "^5.2.0" +"@coral-xyz/anchor@^0.28.0": + version "0.28.0" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.28.0.tgz#8345c3c9186a91f095f704d7b90cd256f7e8b2dc" + integrity sha512-kQ02Hv2ZqxtWP30WN1d4xxT4QqlOXYDxmEd3k/bbneqhV3X5QMO4LAtoUFs7otxyivOgoqam5Il5qx81FuI4vw== + dependencies: + "@coral-xyz/borsh" "^0.28.0" + "@solana/web3.js" "^1.68.0" + base64-js "^1.5.1" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^6.3.0" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + js-sha256 "^0.9.0" + pako "^2.0.3" + snake-case "^3.0.4" + superstruct "^0.15.4" + toml "^3.0.0" + +"@coral-xyz/anchor@^0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.29.0.tgz#bd0be95bedfb30a381c3e676e5926124c310ff12" + integrity sha512-eny6QNG0WOwqV0zQ7cs/b1tIuzZGmP7U7EcH+ogt4Gdbl8HDmIYVMh/9aTmYZPaFWjtUaI8qSn73uYEXWfATdA== + dependencies: + "@coral-xyz/borsh" "^0.29.0" + "@noble/hashes" "^1.3.1" + "@solana/web3.js" "^1.68.0" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^6.3.0" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + pako "^2.0.3" + snake-case "^3.0.4" + superstruct "^0.15.4" + toml "^3.0.0" + "@coral-xyz/borsh@^0.26.0": version "0.26.0" resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.26.0.tgz#d054f64536d824634969e74138f9f7c52bbbc0d5" @@ -1310,6 +1418,22 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" +"@coral-xyz/borsh@^0.28.0": + version "0.28.0" + resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.28.0.tgz#fa368a2f2475bbf6f828f4657f40a52102e02b6d" + integrity sha512-/u1VTzw7XooK7rqeD7JLUSwOyRSesPUk0U37BV9zK0axJc1q0nRbKFGFLYCQ16OtdOJTTwGfGp11Lx9B45bRCQ== + dependencies: + bn.js "^5.1.2" + buffer-layout "^1.2.0" + +"@coral-xyz/borsh@^0.29.0": + version "0.29.0" + resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.29.0.tgz#79f7045df2ef66da8006d47f5399c7190363e71f" + integrity sha512-s7VFVa3a0oqpkuRloWVPdCK7hMbAMY270geZOGfCnaqexrP5dTIpbEHL33req6IYPPJ0hYa71cdvJ1h6V55/oQ== + dependencies: + bn.js "^5.1.2" + buffer-layout "^1.2.0" + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -1317,19 +1441,19 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.0.tgz#f6f729b02feee2c749f57e334b7a1b5f40a81724" - integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.2.tgz#01575e38707add677cf73ca1589abba8da899a02" - integrity sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ== +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.5.1" + espree "^9.6.0" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -1337,10 +1461,24 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.39.0": - version "8.39.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.39.0.tgz#58b536bcc843f4cd1e02a7e6171da5c040f4d44b" - integrity sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== + +"@ethereumjs/rlp@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" + integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== + +"@ethereumjs/util@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" + integrity sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA== + dependencies: + "@ethereumjs/rlp" "^4.0.1" + ethereum-cryptography "^2.0.0" + micro-ftch "^0.3.1" "@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": version "5.7.0" @@ -1684,25 +1822,25 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@hapi/hoek@^9.0.0": +"@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== -"@hapi/topo@^5.0.0": +"@hapi/topo@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== dependencies: "@hapi/hoek" "^9.0.0" -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -1710,10 +1848,27 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== + +"@hxronetwork/dexterity-ts@1.6.16": + version "1.6.16" + resolved "https://registry.yarnpkg.com/@hxronetwork/dexterity-ts/-/dexterity-ts-1.6.16.tgz#2fc4c9b78246756838ffbde09165733b1089c7fe" + integrity sha512-g3SQ8MsMztI1t7WolPG5dWtZhsOYDeCSgLojQNtMm2fCyGhENRnrRweKuz4aJTVOgCb/u0NdtOmmnvB5v66cKw== + dependencies: + "@bonfida/aaob" "0.0.3" + "@coral-xyz/anchor" "^0.29.0" + "@solana/spl-token" "^0.2.0" + "@types/react" "^18.0.7" + bn.js "^5.2.0" + borsh "^0.7.0" + buffer "^6.0.3" + isomorphic-ws "^5.0.0" + react "^18.0.0" + typescript "4.7" + ws "^8.9.0" "@identity.com/solana-gateway-ts@^0.9.0": version "0.9.0" @@ -1772,12 +1927,12 @@ dependencies: jest-get-type "^28.0.2" -"@jest/expect-utils@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.5.0.tgz#f74fad6b6e20f924582dc8ecbf2cb800fe43a036" - integrity sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg== +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== dependencies: - jest-get-type "^29.4.3" + jest-get-type "^29.6.3" "@jest/expect@^28.1.3": version "28.1.3" @@ -1846,12 +2001,12 @@ dependencies: "@sinclair/typebox" "^0.24.1" -"@jest/schemas@^29.4.3": - version "29.4.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.3.tgz#39cf1b8469afc40b6f5a2baaa146e332c4151788" - integrity sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg== +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== dependencies: - "@sinclair/typebox" "^0.25.16" + "@sinclair/typebox" "^0.27.8" "@jest/source-map@^28.1.2": version "28.1.2" @@ -1925,62 +2080,57 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jest/types@^29.5.0": - version "29.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.5.0.tgz#f59ef9b031ced83047c67032700d8c807d6e1593" - integrity sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog== +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== dependencies: - "@jest/schemas" "^29.4.3" + "@jest/schemas" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== dependencies: - "@jridgewell/set-array" "^1.0.1" + "@jridgewell/set-array" "^1.2.1" "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/trace-mapping" "^0.3.24" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== -"@jridgewell/source-map@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.3.tgz#8108265659d4c33e72ffe14e33d6cc5eb59f2fda" - integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg== +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@manypkg/find-root@^1.1.0": version "1.1.0" @@ -2004,6 +2154,40 @@ globby "^11.0.0" read-yaml-file "^1.1.0" +"@metaplex-foundation/beet-solana@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/beet-solana/-/beet-solana-0.4.0.tgz#52891e78674aaa54e0031f1bca5bfbc40de12e8d" + integrity sha512-B1L94N3ZGMo53b0uOSoznbuM5GBNJ8LwSeznxBxJ+OThvfHQ4B5oMUqb+0zdLRfkKGS7Q6tpHK9P+QK0j3w2cQ== + dependencies: + "@metaplex-foundation/beet" ">=0.1.0" + "@solana/web3.js" "^1.56.2" + bs58 "^5.0.0" + debug "^4.3.4" + +"@metaplex-foundation/beet@0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/beet/-/beet-0.7.1.tgz#0975314211643f87b5f6f3e584fa31abcf4c612c" + integrity sha512-hNCEnS2WyCiYyko82rwuISsBY3KYpe828ubsd2ckeqZr7tl0WVLivGkoyA/qdiaaHEBGdGl71OpfWa2rqL3DiA== + dependencies: + ansicolors "^0.3.2" + bn.js "^5.2.0" + debug "^4.3.3" + +"@metaplex-foundation/beet@>=0.1.0": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/beet/-/beet-0.7.2.tgz#fa4726e4cfd4fb6fed6cddc9b5213c1c2a2d0b77" + integrity sha512-K+g3WhyFxKPc0xIvcIjNyV1eaTVJTiuaHZpig7Xx0MuYRMoJLLvhLTnUXhFdR5Tu2l2QSyKwfyXDgZlzhULqFg== + dependencies: + ansicolors "^0.3.2" + assert "^2.1.0" + bn.js "^5.2.0" + debug "^4.3.3" + +"@metaplex-foundation/cusper@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/cusper/-/cusper-0.0.2.tgz#dc2032a452d6c269e25f016aa4dd63600e2af975" + integrity sha512-S9RulC2fFCFOQraz61bij+5YCHhSO9llJegK8c8Y6731fSi6snUSQJdCUqYS8AIgR0TKbQvdvgSyIIdbDFZbBA== + "@mithraic-labs/psy-american@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@mithraic-labs/psy-american/-/psy-american-0.2.3.tgz#a6f3a62f96ec01f94463a7b12f5bf71a003c9942" @@ -2023,32 +2207,34 @@ "@project-serum/serum" "^0.13.62" "@solana/spl-token" "^0.2.0" -"@noble/curves@^1.2.0": +"@noble/curves@1.3.0", "@noble/curves@~1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e" integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== dependencies: "@noble/hashes" "1.3.3" -"@noble/ed25519@^1.6.1", "@noble/ed25519@^1.7.0", "@noble/ed25519@^1.7.1": +"@noble/curves@^1.2.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" + integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg== + dependencies: + "@noble/hashes" "1.4.0" + +"@noble/ed25519@^1.6.1", "@noble/ed25519@^1.7.1": version "1.7.3" resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.3.tgz#57e1677bf6885354b466c38e2b620c62f45a7123" integrity sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ== -"@noble/hashes@1.3.3", "@noble/hashes@^1.3.1": +"@noble/hashes@1.3.3", "@noble/hashes@~1.3.2": version "1.3.3" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== -"@noble/hashes@^1.1.2", "@noble/hashes@^1.1.3": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" - integrity sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg== - -"@noble/secp256k1@^1.6.3": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" - integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== +"@noble/hashes@1.4.0", "@noble/hashes@^1.1.3", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.3", "@noble/hashes@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -2078,12 +2264,12 @@ dependencies: nx "14.7.5" -"@nrwl/cli@14.8.8": - version "14.8.8" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-14.8.8.tgz#ec6dea0d142a760134cdfe33d80a168d8732cced" - integrity sha512-xV1Mu93w5e1Vsd3Pgy9eFC1MHjuLxAAHta5cNgQGxjev+XpnNrGb0x978zpenX7dJ0Pww3Vvi/vdcsaDNg6z4Q== +"@nrwl/cli@14.8.9": + version "14.8.9" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-14.8.9.tgz#3192d0f4113e3d06195c25694d936306201bc632" + integrity sha512-NsnVfM4B4Fqjvu9a9ZeJAzDKQclKeyWvSMXLGCebzsKcIBwbeh6G30nmVV8Z8VkdaJDOvle6QsYSVVNrl416fw== dependencies: - nx "14.8.8" + nx "14.8.9" "@nrwl/devkit@14.7.5": version "14.7.5" @@ -2096,10 +2282,10 @@ semver "7.3.4" tslib "^2.3.0" -"@nrwl/devkit@14.8.8": - version "14.8.8" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-14.8.8.tgz#5c6b7e0571c84ca63e85691e143aab8b896f1536" - integrity sha512-NLgLRfGyv9aMHxGi+rrVRPLYbuqYoGcRVVr0bo3PP1cVSry1THBoLivvPzqf/tniM1S4EzJdrOSau7dfPVGNFA== +"@nrwl/devkit@14.8.9": + version "14.8.9" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-14.8.9.tgz#e9bd2f373fa8afc1a7c83ab71576c25a780b501e" + integrity sha512-C9PxTxTrVundP9xDbub7apkMPP1v1PSIu/d82VdOVnnU3Kvc2fRX2gafSdH+BMBP3SE4bIBblQI6gUuDXbYubw== dependencies: "@phenomnomnominal/tsquery" "4.1.1" ejs "^3.1.7" @@ -2137,14 +2323,14 @@ rxjs "^6.5.4" tslib "^2.3.0" -"@nrwl/jest@14.8.8": - version "14.8.8" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-14.8.8.tgz#3c9ab9403c746359f1a54647d68e19edebbed104" - integrity sha512-zyUKxKmd6joaSPOniKzvHNp2U4kilrFXAeLDsuKbxcXQSQjO7hy7/rFZbU5jfB82Es41HrrL86W8gLAgLN421w== +"@nrwl/jest@14.8.9": + version "14.8.9" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-14.8.9.tgz#fd8f04ca38fad98c8247a423b25c513e5099f04c" + integrity sha512-TTfkwMKiecWAL4r6vkEZCoF+Z+zgeM9fusMEUOjgRZfb+YN1UlJf2B6SrmcsaKoKtEaTC1OEvPSWOZ9w3u/Adw== dependencies: "@jest/reporters" "28.1.1" "@jest/test-result" "28.1.1" - "@nrwl/devkit" "14.8.8" + "@nrwl/devkit" "14.8.9" "@phenomnomnominal/tsquery" "4.1.1" chalk "4.1.0" dotenv "~10.0.0" @@ -2156,14 +2342,14 @@ tslib "^2.3.0" "@nrwl/js@^14.7.5": - version "14.8.8" - resolved "https://registry.yarnpkg.com/@nrwl/js/-/js-14.8.8.tgz#9343745c1736768b7b7fd94d424bdecbd88c1d6f" - integrity sha512-U9gAREO0ZOu/pMDrO05f2Z88gxhIyulqlhlbe05PgFYkPXFR712bSKZX2dIH9P1Buk7QYzQWz5vpnGrX0kV8VQ== - dependencies: - "@nrwl/devkit" "14.8.8" - "@nrwl/jest" "14.8.8" - "@nrwl/linter" "14.8.8" - "@nrwl/workspace" "14.8.8" + version "14.8.9" + resolved "https://registry.yarnpkg.com/@nrwl/js/-/js-14.8.9.tgz#c138961c8ba5bd35979529f9b2bb1e1ef607b2e3" + integrity sha512-hS97yfoY7m+WrWF61G0bKmkUiMG8sGALYgVd+uhkvj3pujJBJ6qIy9MmeOCgCTCQZ8owmZgFh1NS9PgBs1D4Kg== + dependencies: + "@nrwl/devkit" "14.8.9" + "@nrwl/jest" "14.8.9" + "@nrwl/linter" "14.8.9" + "@nrwl/workspace" "14.8.9" "@parcel/watcher" "2.0.4" chalk "4.1.0" fast-glob "3.2.7" @@ -2186,15 +2372,15 @@ tmp "~0.2.1" tslib "^2.3.0" -"@nrwl/linter@14.8.8": - version "14.8.8" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-14.8.8.tgz#298b6643730bd1ddd6301afacb0a5f6caefec1ab" - integrity sha512-Siu4KogGRJpESVgWqv1mXM28aqs7e/Uerb4miaSflCfXAhJo7kbsALfDOomhqubvGyE5r4dyorLMtVPbZA5iFg== +"@nrwl/linter@14.8.9": + version "14.8.9" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-14.8.9.tgz#99298d8ea1c075e1873b16dc6bd4ac710f79c671" + integrity sha512-JqDAIxL2Tmb+jlNb706XuldMIDBKD2FyDnYTTGyQ+nKcB/0RISEEG9o+A/JnhG1YN8PxZ/oGnrsY65agfufCdg== dependencies: - "@nrwl/devkit" "14.8.8" - "@nrwl/jest" "14.8.8" + "@nrwl/devkit" "14.8.9" + "@nrwl/jest" "14.8.9" "@phenomnomnominal/tsquery" "4.1.1" - nx "14.8.8" + nx "14.8.9" tmp "~0.2.1" tslib "^2.3.0" @@ -2205,12 +2391,12 @@ dependencies: nx "14.7.5" -"@nrwl/tao@14.8.8": - version "14.8.8" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-14.8.8.tgz#e09ff9806d5797a019a74c2f3cbae86f4a0c3508" - integrity sha512-cfTNM2cgI1miKLkGemU09v72EEYiRxyRw1jdHJ/zShcvcvt8CZI9mUtcV578Cx1K2yNFLseFkUS0rGh+fbcmrA== +"@nrwl/tao@14.8.9": + version "14.8.9" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-14.8.9.tgz#04aeb2846f42bfaa4612b899a5a068257576e005" + integrity sha512-llaZvTCXUmj4WtpbnjZOOzyTWcZIkj7gmtY5sa1nrTvbls9BaFRabOvfW4/z3s3E3iavni9ENMuuaHOfHyiRkg== dependencies: - nx "14.8.8" + nx "14.8.9" "@nrwl/workspace@14.7.5": version "14.7.5" @@ -2243,14 +2429,14 @@ yargs "^17.4.0" yargs-parser "21.0.1" -"@nrwl/workspace@14.8.8": - version "14.8.8" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-14.8.8.tgz#fac07d662bcab72306ea57db8b189063a4fbc91c" - integrity sha512-wxrc8k9XF2Dlq/TujgLWh1bYm4gX5yCooZIQ1EIPvSnnpTl080KKEJ+6YJExQtqE6tOF0W9zVvpkmtVGdS63Ig== +"@nrwl/workspace@14.8.9": + version "14.8.9" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-14.8.9.tgz#87f9910c92bf8cfb99b8d5a5cc6e87df4eed3315" + integrity sha512-kn5zPhBG0OFwKPCVkgY0t1Jke1KAQyyoYC0d5JhON3KW/TgXrOeUHXOjHr2cL5yCnRLcqdwPxaSqwfK2JFUc2g== dependencies: - "@nrwl/devkit" "14.8.8" - "@nrwl/jest" "14.8.8" - "@nrwl/linter" "14.8.8" + "@nrwl/devkit" "14.8.9" + "@nrwl/jest" "14.8.9" + "@nrwl/linter" "14.8.9" "@parcel/watcher" "2.0.4" chalk "4.1.0" chokidar "^3.5.1" @@ -2265,7 +2451,7 @@ ignore "^5.0.4" minimatch "3.0.5" npm-run-path "^4.0.1" - nx "14.8.8" + nx "14.8.9" open "^8.4.0" rxjs "^6.5.4" semver "7.3.4" @@ -2476,10 +2662,32 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== +"@scure/base@~1.1.4": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.6.tgz#8ce5d304b436e4c84f896e0550c83e4d88cb917d" + integrity sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g== + +"@scure/bip32@1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.3.tgz#a9624991dc8767087c57999a5d79488f48eae6c8" + integrity sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ== + dependencies: + "@noble/curves" "~1.3.0" + "@noble/hashes" "~1.3.2" + "@scure/base" "~1.1.4" + +"@scure/bip39@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.2.tgz#f3426813f4ced11a47489cbcf7294aa963966527" + integrity sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA== + dependencies: + "@noble/hashes" "~1.3.2" + "@scure/base" "~1.1.4" + +"@sideway/address@^4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" + integrity sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q== dependencies: "@hapi/hoek" "^9.0.0" @@ -2498,10 +2706,10 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== -"@sinclair/typebox@^0.25.16": - version "0.25.24" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.24.tgz#8c7688559979f7079aacaf31aa881c3aa410b718" - integrity sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ== +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.3": version "1.8.6" @@ -2518,18 +2726,25 @@ type-detect "4.0.8" "@sinonjs/commons@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" - integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^10.0.2": - version "10.0.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz#d10549ed1f423d80639c528b6c7f5a1017747d0c" - integrity sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw== +"@sinonjs/fake-timers@^10.3.0": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: - "@sinonjs/commons" "^2.0.0" + "@sinonjs/commons" "^3.0.0" + +"@sinonjs/fake-timers@^11.2.2": + version "11.2.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz#50063cc3574f4a27bd8453180a04171c85cc9699" + integrity sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw== + dependencies: + "@sinonjs/commons" "^3.0.0" "@sinonjs/fake-timers@^9.1.2": version "9.1.2" @@ -2556,11 +2771,18 @@ lodash.get "^4.4.2" type-detect "^4.0.8" -"@sinonjs/text-encoding@^0.7.1": +"@sinonjs/text-encoding@^0.7.2": version "0.7.2" resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918" integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ== +"@smithy/types@^2.9.1": + version "2.12.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.12.0.tgz#c44845f8ba07e5e8c88eda5aed7e6a0c462da041" + integrity sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw== + dependencies: + tslib "^2.6.2" + "@solana/buffer-layout-utils@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" @@ -2571,13 +2793,73 @@ bigint-buffer "^1.1.5" bignumber.js "^9.0.1" -"@solana/buffer-layout@^4.0.0": +"@solana/buffer-layout@^4.0.0", "@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== dependencies: buffer "~6.0.3" +"@solana/codecs-core@2.0.0-experimental.8618508": + version "2.0.0-experimental.8618508" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-experimental.8618508.tgz#4f6709dd50e671267f3bea7d09209bc6471b7ad0" + integrity sha512-JCz7mKjVKtfZxkuDtwMAUgA7YvJcA2BwpZaA1NOLcted4OMC4Prwa3DUe3f3181ixPYaRyptbF0Ikq2MbDkYEA== + +"@solana/codecs-data-structures@2.0.0-experimental.8618508": + version "2.0.0-experimental.8618508" + resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-experimental.8618508.tgz#c16a704ac0f743a2e0bf73ada42d830b3402d848" + integrity sha512-sLpjL9sqzaDdkloBPV61Rht1tgaKq98BCtIKRuyscIrmVPu3wu0Bavk2n/QekmUzaTsj7K1pVSniM0YqCdnEBw== + dependencies: + "@solana/codecs-core" "2.0.0-experimental.8618508" + "@solana/codecs-numbers" "2.0.0-experimental.8618508" + +"@solana/codecs-numbers@2.0.0-experimental.8618508": + version "2.0.0-experimental.8618508" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-experimental.8618508.tgz#d84f9ed0521b22e19125eefc7d51e217fcaeb3e4" + integrity sha512-EXQKfzFr3CkKKNzKSZPOOOzchXsFe90TVONWsSnVkonO9z+nGKALE0/L9uBmIFGgdzhhU9QQVFvxBMclIDJo2Q== + dependencies: + "@solana/codecs-core" "2.0.0-experimental.8618508" + +"@solana/codecs-strings@2.0.0-experimental.8618508": + version "2.0.0-experimental.8618508" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-experimental.8618508.tgz#72457b884d9be80b59b263bcce73892b081e9402" + integrity sha512-b2yhinr1+oe+JDmnnsV0641KQqqDG8AQ16Z/x7GVWO+AWHMpRlHWVXOq8U1yhPMA4VXxl7i+D+C6ql0VGFp0GA== + dependencies: + "@solana/codecs-core" "2.0.0-experimental.8618508" + "@solana/codecs-numbers" "2.0.0-experimental.8618508" + +"@solana/options@2.0.0-experimental.8618508": + version "2.0.0-experimental.8618508" + resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-experimental.8618508.tgz#95385340e85f9e8a81b2bfba089404a61c8e9520" + integrity sha512-fy/nIRAMC3QHvnKi63KEd86Xr/zFBVxNW4nEpVEU2OT0gCEKwHY4Z55YHf7XujhyuM3PNpiBKg/YYw5QlRU4vg== + dependencies: + "@solana/codecs-core" "2.0.0-experimental.8618508" + "@solana/codecs-numbers" "2.0.0-experimental.8618508" + +"@solana/spl-token-metadata@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@solana/spl-token-metadata/-/spl-token-metadata-0.1.2.tgz#876e13432bd2960bd3cac16b9b0af63e69e37719" + integrity sha512-hJYnAJNkDrtkE2Q41YZhCpeOGU/0JgRFXbtrtOuGGeKc3pkEUHB9DDoxZAxx+XRno13GozUleyBi0qypz4c3bw== + dependencies: + "@solana/codecs-core" "2.0.0-experimental.8618508" + "@solana/codecs-data-structures" "2.0.0-experimental.8618508" + "@solana/codecs-numbers" "2.0.0-experimental.8618508" + "@solana/codecs-strings" "2.0.0-experimental.8618508" + "@solana/options" "2.0.0-experimental.8618508" + "@solana/spl-type-length-value" "0.1.0" + +"@solana/spl-token@0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.5.tgz#dcb6cb4bd7acb3c6457500502b6e62c75d18d05b" + integrity sha512-2rlgKbH3lCTIuxwm4A+R2/t+w3Rt2tJLpGH6jefQQUpM6MyxlQWV+P9pB7+lozuWDOJ7A2OyKkUEt/HlxyHFjw== + dependencies: + "@babel/runtime" "^7.10.5" + "@solana/web3.js" "^1.12.0" + bn.js "^5.1.0" + buffer "6.0.3" + buffer-layout "^1.2.0" + dotenv "10.0.0" + "@solana/spl-token@^0.1.6", "@solana/spl-token@^0.1.8": version "0.1.8" resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.8.tgz#f06e746341ef8d04165e21fc7f555492a2a0faa6" @@ -2600,74 +2882,51 @@ "@solana/web3.js" "^1.32.0" start-server-and-test "^1.14.0" -"@solana/spl-token@^0.3.5": - version "0.3.7" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.3.7.tgz#6f027f9ad8e841f792c32e50920d9d2e714fc8da" - integrity sha512-bKGxWTtIw6VDdCBngjtsGlKGLSmiu/8ghSt/IOYJV24BsymRbgq7r12GToeetpxmPaZYLddKwAz7+EwprLfkfg== +"@solana/spl-token@^0.3.5", "@solana/spl-token@^0.3.6", "@solana/spl-token@^0.3.8": + version "0.3.11" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.3.11.tgz#cdc10f9472b29b39c8983c92592cadd06627fb9a" + integrity sha512-bvohO3rIMSVL24Pb+I4EYTJ6cL82eFpInEXD/I8K8upOGjpqHsKUoAempR/RnUlI1qSFNyFlWJfu6MNUgfbCQQ== dependencies: "@solana/buffer-layout" "^4.0.0" "@solana/buffer-layout-utils" "^0.2.0" + "@solana/spl-token-metadata" "^0.1.2" buffer "^6.0.3" -"@solana/spl-token@^0.3.8": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.3.9.tgz#477e703c3638ffb17dd29b82a203c21c3e465851" - integrity sha512-1EXHxKICMnab35MvvY/5DBc/K/uQAOJCYnDZXw83McCAYUAfi+rwq6qfd6MmITmSTEhcfBcl/zYxmW/OSN0RmA== +"@solana/spl-type-length-value@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@solana/spl-type-length-value/-/spl-type-length-value-0.1.0.tgz#b5930cf6c6d8f50c7ff2a70463728a4637a2f26b" + integrity sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA== dependencies: - "@solana/buffer-layout" "^4.0.0" - "@solana/buffer-layout-utils" "^0.2.0" buffer "^6.0.3" "@solana/wallet-adapter-base@^0.9.2": - version "0.9.22" - resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.22.tgz#97812eaf6aebe01e5fe714326b3c9a0614ae6112" - integrity sha512-xbLEZPGSJFvgTeldG9D55evhl7QK/3e/F7vhvcA97mEt1eieTgeKMnGlmmjs3yivI3/gtZNZeSk1XZLnhKcQvw== + version "0.9.23" + resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.9.23.tgz#3b17c28afd44e173f44f658bf9700fd637e12a11" + integrity sha512-apqMuYwFp1jFi55NxDfvXUX2x1T0Zh07MxhZ/nCCTGys5raSfYUh82zen2BLv8BSDj/JxZ2P/s7jrQZGrX8uAw== dependencies: - "@solana/wallet-standard-features" "^1.0.1" + "@solana/wallet-standard-features" "^1.1.0" "@wallet-standard/base" "^1.0.1" "@wallet-standard/features" "^1.0.3" eventemitter3 "^4.0.7" -"@solana/wallet-standard-features@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@solana/wallet-standard-features/-/wallet-standard-features-1.0.1.tgz#36270a646f74a80e51b9e21fb360edb64f840c68" - integrity sha512-SUfx7KtBJ55XIj0qAhhVcC1I6MklAXqWFEz9hDHW+6YcJIyvfix/EilBhaBik1FJ2JT0zukpOfFv8zpuAbFRbw== +"@solana/wallet-standard-features@^1.1.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@solana/wallet-standard-features/-/wallet-standard-features-1.2.0.tgz#be8b3824abf5ebcfeaa7298445bf53f76a27c935" + integrity sha512-tUd9srDLkRpe1BYg7we+c4UhRQkq+XQWswsr/L1xfGmoRDF47BPSXf4zE7ZU2GRBGvxtGt7lwJVAufQyQYhxTQ== dependencies: "@wallet-standard/base" "^1.0.1" "@wallet-standard/features" "^1.0.3" -"@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.28.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.56.2", "@solana/web3.js@^1.63.0": - version "1.75.0" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.75.0.tgz#824c6f78865007bca758ca18f268d6f7363b42e5" - integrity sha512-rHQgdo1EWfb+nPUpHe4O7i8qJPELHKNR5PAZRK+a7XxiykqOfbaAlPt5boDWAGPnYbSv0ziWZv5mq9DlFaQCxg== - dependencies: - "@babel/runtime" "^7.12.5" - "@noble/ed25519" "^1.7.0" - "@noble/hashes" "^1.1.2" - "@noble/secp256k1" "^1.6.3" - "@solana/buffer-layout" "^4.0.0" - agentkeepalive "^4.2.1" - bigint-buffer "^1.1.5" - bn.js "^5.0.0" - borsh "^0.7.0" - bs58 "^4.0.1" - buffer "6.0.3" - fast-stable-stringify "^1.0.0" - jayson "^3.4.4" - node-fetch "^2.6.7" - rpc-websockets "^7.5.1" - superstruct "^0.14.2" - -"@solana/web3.js@^1.68.0", "@solana/web3.js@^1.87.6": - version "1.87.6" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.87.6.tgz#6744cfc5f4fc81e0f58241c0a92648a7320bb3bf" - integrity sha512-LkqsEBgTZztFiccZZXnawWa8qNCATEqE97/d0vIwjTclmVlc8pBpD1DmjfVHtZ1HS5fZorFlVhXfpwnCNDZfyg== +"@solana/web3.js@^1.12.0", "@solana/web3.js@^1.15.0", "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.28.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0", "@solana/web3.js@^1.56.2", "@solana/web3.js@^1.63.0", "@solana/web3.js@^1.68.0", "@solana/web3.js@^1.70.3", "@solana/web3.js@^1.87.6": + version "1.91.4" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.91.4.tgz#b80295ce72aa125930dfc5b41b4b4e3f85fd87fa" + integrity sha512-zconqecIcBqEF6JiM4xYF865Xc4aas+iWK5qnu7nwKPq9ilRYcn+2GiwpYXqUqqBUe0XCO17w18KO0F8h+QATg== dependencies: - "@babel/runtime" "^7.23.2" + "@babel/runtime" "^7.23.4" "@noble/curves" "^1.2.0" - "@noble/hashes" "^1.3.1" - "@solana/buffer-layout" "^4.0.0" - agentkeepalive "^4.3.0" + "@noble/hashes" "^1.3.3" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" bigint-buffer "^1.1.5" bn.js "^5.2.1" borsh "^0.7.0" @@ -2675,19 +2934,35 @@ buffer "6.0.3" fast-stable-stringify "^1.0.0" jayson "^4.1.0" - node-fetch "^2.6.12" + node-fetch "^2.7.0" rpc-websockets "^7.5.1" superstruct "^0.14.2" +"@sqds/multisig@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@sqds/multisig/-/multisig-2.1.1.tgz#43cf21f79a70d91a3bab508a3c819573c89ea417" + integrity sha512-bNXKnz3/12ynS6ASt8tx3u4U1HGi2i5qE6YqSJBkpIC+FBvsazBAdpCgIsjv3SeczkzkHfVhusmkrlsjtSdfCQ== + dependencies: + "@metaplex-foundation/beet" "0.7.1" + "@metaplex-foundation/beet-solana" "0.4.0" + "@metaplex-foundation/cusper" "^0.0.2" + "@solana/spl-token" "^0.3.6" + "@solana/web3.js" "^1.70.3" + "@types/bn.js" "^5.1.1" + assert "^2.0.0" + bn.js "^5.2.1" + buffer "6.0.3" + invariant "2.2.4" + "@supercharge/promise-pool@^2.1.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@supercharge/promise-pool/-/promise-pool-2.4.0.tgz#6050eea8c2d7f92ddd4ddc582ee328b15c034ad3" integrity sha512-O9CMipBlq5OObdt1uKJGIzm9cdjpPWfj+a+Zw9EgWKxaMNHKC7EU7X9taj3H0EGQNLOSq2jAcOa3EzxlfHsD6w== "@types/babel__core@^7.1.14": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.0.tgz#61bc5a4cae505ce98e1e36c5445e4bee060d8891" - integrity sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ== + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== dependencies: "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" @@ -2696,31 +2971,31 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + version "7.6.8" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" + integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.18.5" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.5.tgz#c107216842905afafd3b6e774f6f935da6f5db80" - integrity sha512-enCvTL8m/EHS/zIvJno9nE+ndYPh1/oNFzRYRmtUqJICG2VnCSBzMLW5VN2KCQU91f23tsNKR8v7VJJQMatl7Q== + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.5.tgz#7b7502be0aa80cc4ef22978846b983edaafcd4dd" + integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== dependencies: - "@babel/types" "^7.3.0" + "@babel/types" "^7.20.7" "@types/big.js@^6.1.6": - version "6.1.6" - resolved "https://registry.yarnpkg.com/@types/big.js/-/big.js-6.1.6.tgz#3d417e758483d55345a03a087f7e0c87137ca444" - integrity sha512-0r9J+Zz9rYm2hOTwiMAVkm3XFQ4u5uTK37xrQMhc9bysn/sf/okzovWMYYIBMFTn/yrEZ11pusgLEaoarTlQbA== + version "6.2.2" + resolved "https://registry.yarnpkg.com/@types/big.js/-/big.js-6.2.2.tgz#69422ec9ef59df1330ccfde2106d9e1159a083c3" + integrity sha512-e2cOW9YlVzFY2iScnGBBkplKsrn2CsObHQ2Hiw4V1sSyiGbgWL8IyqE3zFi1Pt5o1pdAtYkDAIsF3KKUPjdzaA== "@types/bn.js@^4.11.5": version "4.11.6" @@ -2729,10 +3004,10 @@ dependencies: "@types/node" "*" -"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== +"@types/bn.js@^5.1.1": + version "5.1.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" + integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== dependencies: "@types/node" "*" @@ -2744,28 +3019,28 @@ commander "*" "@types/connect@^3.4.33": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== dependencies: "@types/node" "*" "@types/cookie@^0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.5.1.tgz#b29aa1f91a59f35e29ff8f7cb24faf1a3a750554" - integrity sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g== + version "0.5.4" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.5.4.tgz#7e70a20cd695bc48d46b08c2505874cd68b760e0" + integrity sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA== "@types/debug@^4.1.7": - version "4.1.7" - resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" - integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg== + version "4.1.12" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917" + integrity sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ== dependencies: "@types/ms" "*" "@types/estree@*": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" - integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== "@types/estree@0.0.39": version "0.0.39" @@ -2780,42 +3055,35 @@ expect "*" "@types/graceful-fs@^4.1.3": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" - integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== dependencies: "@types/node" "*" -"@types/is-ci@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/is-ci/-/is-ci-3.0.0.tgz#7e8910af6857601315592436f030aaa3ed9783c3" - integrity sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ== - dependencies: - ci-info "^3.1.0" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== "@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== dependencies: "@types/istanbul-lib-report" "*" "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/json5@^0.0.29": version "0.0.29" @@ -2823,23 +3091,23 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/lodash.isequal@^4.5.6": - version "4.5.6" - resolved "https://registry.yarnpkg.com/@types/lodash.isequal/-/lodash.isequal-4.5.6.tgz#ff42a1b8e20caa59a97e446a77dc57db923bc02b" - integrity sha512-Ww4UGSe3DmtvLLJm2F16hDwEQSv7U0Rr8SujLUA2wHI2D2dm8kPu6Et+/y303LfjTIwSBKXB/YTUcAKpem/XEg== + version "4.5.8" + resolved "https://registry.yarnpkg.com/@types/lodash.isequal/-/lodash.isequal-4.5.8.tgz#b30bb6ff6a5f6c19b3daf389d649ac7f7a250499" + integrity sha512-uput6pg4E/tj2LGxCZo9+y27JNyB2OZuuI/T5F+ylVDYuqICLG2/ktjxx0v6GvVntAf8TvEzeQLcV0ffRirXuA== dependencies: "@types/lodash" "*" "@types/lodash@*": - version "4.14.194" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.194.tgz#b71eb6f7a0ff11bff59fc987134a093029258a76" - integrity sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g== + version "4.17.0" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3" + integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA== "@types/mdast@^3.0.0": - version "3.0.11" - resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.11.tgz#dc130f7e7d9306124286f6d6cee40cf4d14a3dc0" - integrity sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw== + version "3.0.15" + resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.15.tgz#49c524a263f30ffa28b71ae282f813ed000ab9f5" + integrity sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ== dependencies: - "@types/unist" "*" + "@types/unist" "^2" "@types/mime@^2.0.3": version "2.0.3" @@ -2852,32 +3120,34 @@ integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== "@types/minimist@^1.2.0": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" - integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== + version "1.2.5" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" + integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== "@types/mocha@^10.0.1": - version "10.0.1" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.1.tgz#2f4f65bb08bc368ac39c96da7b2f09140b26851b" - integrity sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q== + version "10.0.6" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b" + integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== "@types/ms@*": - version "0.7.31" - resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" - integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== + version "0.7.34" + resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" + integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== "@types/node-fetch@^2.6.2": - version "2.6.3" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.3.tgz#175d977f5e24d93ad0f57602693c435c57ad7e80" - integrity sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w== + version "2.6.11" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" + integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== dependencies: "@types/node" "*" - form-data "^3.0.0" + form-data "^4.0.0" "@types/node@*": - version "18.16.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.3.tgz#6bda7819aae6ea0b386ebc5b24bdf602f1b42b01" - integrity sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q== + version "20.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" + integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== + dependencies: + undici-types "~5.26.4" "@types/node@11.11.6": version "11.11.6" @@ -2890,26 +3160,32 @@ integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== "@types/normalize-package-data@^2.4.0": - version "2.4.1" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" - integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== + version "2.4.4" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" + integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== "@types/parse-json@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" - integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239" + integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== "@types/prettier@^2.1.5": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" - integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== + version "2.7.3" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" + integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== + +"@types/prop-types@*": + version "15.7.12" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" + integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== + +"@types/react@^18.0.7": + version "18.2.77" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.77.tgz#af2f857b6a6dfb6ca89ec102ebc147b1f1616880" + integrity sha512-CUT9KUUF+HytDM7WiXKLF9qUSg4tGImwy4FXTlfEDPEkkNUzJ7rVFolYweJ9fS1ljoIaP7M7Rdjc5eUm/Yu5AA== + dependencies: + "@types/prop-types" "*" + csstype "^3.0.2" "@types/resolve@1.17.1": version "1.17.1" @@ -2918,39 +3194,27 @@ dependencies: "@types/node" "*" -"@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== - dependencies: - "@types/node" "*" - -"@types/semver@^6.0.0": - version "6.2.3" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.3.tgz#5798ecf1bec94eaa64db39ee52808ec0693315aa" - integrity sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A== - -"@types/semver@^7.3.12": - version "7.3.13" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" - integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== +"@types/semver@^7.3.12", "@types/semver@^7.5.0": + version "7.5.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== "@types/sinon@^10.0.13": - version "10.0.14" - resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.14.tgz#6bd18b088ea5ef1e5153fa37d0b68e91eff09e22" - integrity sha512-mn72up6cjaMyMuaPaa/AwKf6WtsSRysQC7wxFkCm1XcOKXPM1z+5Y4H5wjIVBz4gdAkjvZxVVfjA6ba1nHr5WQ== + version "10.0.20" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.20.tgz#f1585debf4c0d99f9938f4111e5479fb74865146" + integrity sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg== dependencies: "@types/sinonjs__fake-timers" "*" "@types/sinonjs__fake-timers@*": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz#bf2e02a3dbd4aecaf95942ecd99b7402e03fad5e" - integrity sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA== + version "8.1.5" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz#5fd3592ff10c1e9695d377020c033116cc2889f2" + integrity sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ== "@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== "@types/tape@^4.13.2": version "4.13.4" @@ -2961,21 +3225,21 @@ "@types/through" "*" "@types/through@*": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895" - integrity sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg== + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.33.tgz#14ebf599320e1c7851e7d598149af183c6b9ea56" + integrity sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ== dependencies: "@types/node" "*" -"@types/unist@*", "@types/unist@^2.0.2": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" - integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== +"@types/unist@^2", "@types/unist@^2.0.2": + version "2.0.10" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.10.tgz#04ffa7f406ab628f7f7e97ca23e290cd8ab15efc" + integrity sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA== "@types/uuid@^9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6" - integrity sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA== + version "9.0.8" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.8.tgz#7545ba4fc3c003d6c756f651f3bf163d8f0f29ba" + integrity sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA== "@types/ws@^7.4.4": version "7.4.7" @@ -2985,158 +3249,152 @@ "@types/node" "*" "@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + version "21.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.24" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" - integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== + version "17.0.32" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" + integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== dependencies: "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.37.0": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz#9b09ee1541bff1d2cebdcb87e7ce4a4003acde08" - integrity sha512-AVi0uazY5quFB9hlp2Xv+ogpfpk77xzsgsIEWyVS7uK/c7MZ5tw7ZPbapa0SbfkqE0fsAMkz5UwtgMLVk2BQAg== + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== dependencies: "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.59.1" - "@typescript-eslint/type-utils" "5.59.1" - "@typescript-eslint/utils" "5.59.1" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" natural-compare-lite "^1.4.0" semver "^7.3.7" tsutils "^3.21.0" "@typescript-eslint/parser@^5.37.0": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.1.tgz#73c2c12127c5c1182d2e5b71a8fa2a85d215cbb4" - integrity sha512-nzjFAN8WEu6yPRDizIFyzAfgK7nybPodMNFGNH0M9tei2gYnYszRDqVA0xlnRjkl7Hkx2vYrEdb6fP2a21cG1g== + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "5.59.1" - "@typescript-eslint/types" "5.59.1" - "@typescript-eslint/typescript-estree" "5.59.1" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.59.1": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz#8a20222719cebc5198618a5d44113705b51fd7fe" - integrity sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA== +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== dependencies: - "@typescript-eslint/types" "5.59.1" - "@typescript-eslint/visitor-keys" "5.59.1" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/type-utils@5.59.1": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz#63981d61684fd24eda2f9f08c0a47ecb000a2111" - integrity sha512-ZMWQ+Oh82jWqWzvM3xU+9y5U7MEMVv6GLioM3R5NJk6uvP47kZ7YvlgSHJ7ERD6bOY7Q4uxWm25c76HKEwIjZw== +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/typescript-estree" "5.59.1" - "@typescript-eslint/utils" "5.59.1" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.59.1": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.1.tgz#03f3fedd1c044cb336ebc34cc7855f121991f41d" - integrity sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/typescript-estree@5.59.1": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz#4aa546d27fd0d477c618f0ca00b483f0ec84c43c" - integrity sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA== +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "5.59.1" - "@typescript-eslint/visitor-keys" "5.59.1" + "@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" -"@typescript-eslint/utils@5.59.1", "@typescript-eslint/utils@^5.36.1": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.1.tgz#d89fc758ad23d2157cfae53f0b429bdf15db9473" - integrity sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA== +"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.36.1": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.59.1" - "@typescript-eslint/types" "5.59.1" - "@typescript-eslint/typescript-estree" "5.59.1" + "@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" -"@typescript-eslint/visitor-keys@5.59.1": - version "5.59.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz#0d96c36efb6560d7fb8eb85de10442c10d8f6058" - integrity sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA== +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: - "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@vue/compiler-core@3.2.47": - version "3.2.47" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.47.tgz#3e07c684d74897ac9aa5922c520741f3029267f8" - integrity sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig== - dependencies: - "@babel/parser" "^7.16.4" - "@vue/shared" "3.2.47" - estree-walker "^2.0.2" - source-map "^0.6.1" +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@vue/compiler-dom@3.2.47": - version "3.2.47" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz#a0b06caf7ef7056939e563dcaa9cbde30794f305" - integrity sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ== - dependencies: - "@vue/compiler-core" "3.2.47" - "@vue/shared" "3.2.47" - -"@vue/compiler-sfc@^3.0.5": - version "3.2.47" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz#1bdc36f6cdc1643f72e2c397eb1a398f5004ad3d" - integrity sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ== - dependencies: - "@babel/parser" "^7.16.4" - "@vue/compiler-core" "3.2.47" - "@vue/compiler-dom" "3.2.47" - "@vue/compiler-ssr" "3.2.47" - "@vue/reactivity-transform" "3.2.47" - "@vue/shared" "3.2.47" +"@vue/compiler-core@3.4.21": + version "3.4.21" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.21.tgz#868b7085378fc24e58c9aed14c8d62110a62be1a" + integrity sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og== + dependencies: + "@babel/parser" "^7.23.9" + "@vue/shared" "3.4.21" + entities "^4.5.0" estree-walker "^2.0.2" - magic-string "^0.25.7" - postcss "^8.1.10" - source-map "^0.6.1" + source-map-js "^1.0.2" -"@vue/compiler-ssr@3.2.47": - version "3.2.47" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz#35872c01a273aac4d6070ab9d8da918ab13057ee" - integrity sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw== +"@vue/compiler-dom@3.4.21": + version "3.4.21" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.21.tgz#0077c355e2008207283a5a87d510330d22546803" + integrity sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA== dependencies: - "@vue/compiler-dom" "3.2.47" - "@vue/shared" "3.2.47" + "@vue/compiler-core" "3.4.21" + "@vue/shared" "3.4.21" -"@vue/reactivity-transform@3.2.47": - version "3.2.47" - resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.47.tgz#e45df4d06370f8abf29081a16afd25cffba6d84e" - integrity sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA== +"@vue/compiler-sfc@^3.3.4": + version "3.4.21" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.21.tgz#4af920dc31ab99e1ff5d152b5fe0ad12181145b2" + integrity sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ== dependencies: - "@babel/parser" "^7.16.4" - "@vue/compiler-core" "3.2.47" - "@vue/shared" "3.2.47" + "@babel/parser" "^7.23.9" + "@vue/compiler-core" "3.4.21" + "@vue/compiler-dom" "3.4.21" + "@vue/compiler-ssr" "3.4.21" + "@vue/shared" "3.4.21" estree-walker "^2.0.2" - magic-string "^0.25.7" + magic-string "^0.30.7" + postcss "^8.4.35" + source-map-js "^1.0.2" + +"@vue/compiler-ssr@3.4.21": + version "3.4.21" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.21.tgz#b84ae64fb9c265df21fc67f7624587673d324fef" + integrity sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q== + dependencies: + "@vue/compiler-dom" "3.4.21" + "@vue/shared" "3.4.21" -"@vue/shared@3.2.47": - version "3.2.47" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.47.tgz#e597ef75086c6e896ff5478a6bfc0a7aa4bbd14c" - integrity sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ== +"@vue/shared@3.4.21": + version "3.4.21" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.21.tgz#de526a9059d0a599f0b429af7037cd0c3ed7d5a1" + integrity sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g== "@wallet-standard/base@^1.0.1": version "1.0.1" @@ -3156,9 +3414,9 @@ integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== "@yarnpkg/parsers@^3.0.0-rc.18": - version "3.0.0-rc.42" - resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.42.tgz#3814e90a81bb1f9c06cc83c6a009139c55efe94d" - integrity sha512-eW9Mbegmb5bJjwawJM9ghjUjUqciNMhC6L7XrQPF/clXS5bbP66MstsgCT5hy9VlfUh/CfBT+0Wucf531dMjHA== + version "3.0.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0.tgz#a43136f094bca5dcc1ae784c296446a85211cc62" + integrity sha512-jVZa3njBv6tcOUw34nlUdUM/40wwtm/gnVF8rtk0tA6vNcokqYI8CFU1BZjlpFwUSZaXxYkrtuPE/f2MMFlTxQ== dependencies: js-yaml "^3.10.0" tslib "^2.4.0" @@ -3183,26 +3441,17 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.5.0, acorn@^8.8.0: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +acorn@^8.8.2, acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== aes-js@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -agentkeepalive@^4.2.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.3.0.tgz#bb999ff07412653c1803b3ced35e50729830a255" - integrity sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg== - dependencies: - debug "^4.1.0" - depd "^2.0.0" - humanize-ms "^1.2.1" - -agentkeepalive@^4.3.0: +agentkeepalive@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== @@ -3217,7 +3466,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -3258,13 +3507,20 @@ ansi-colors@^4.1.1, ansi-colors@^4.1.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" +ansi-escapes@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-5.0.0.tgz#b6a0caf0eef0c41af190e9a749e0c00ec04bb2a6" + integrity sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA== + dependencies: + type-fest "^1.0.2" + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -3276,9 +3532,9 @@ ansi-regex@^6.0.1: integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== ansi-sequence-parser@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed" - integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== + version "1.1.1" + resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== ansi-styles@^3.2.1: version "3.2.1" @@ -3299,7 +3555,7 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -ansi-styles@^6.0.0: +ansi-styles@^6.0.0, ansi-styles@^6.1.0: version "6.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== @@ -3325,9 +3581,9 @@ append-transform@^2.0.0: default-require-extensions "^3.0.0" arbundles@^0.6.21: - version "0.6.22" - resolved "https://registry.yarnpkg.com/arbundles/-/arbundles-0.6.22.tgz#0fd58ec76514f1d6c2db7c5870a6232314f52de6" - integrity sha512-QlSavBHk59mNqgQ6ScxlqaBJlDbSmSrK/uTcF3HojLAZ/4aufTkVTBjl1hSfZ/ZN45oIPgJC05R8SmVARF+8VA== + version "0.6.23" + resolved "https://registry.yarnpkg.com/arbundles/-/arbundles-0.6.23.tgz#c00cda953df67fa65d4297486237cc8e0c072c47" + integrity sha512-+gr93F3fivN+6dhiImT6BQNaXz4oECPn2GYjCZjS2yEoq7hM78FRvVp6kQyjEdhnuBFQr/q4oS/nkjnQlHdj9Q== dependencies: "@noble/ed25519" "^1.6.1" "@randlabs/myalgo-connect" "^1.1.2" @@ -3335,7 +3591,7 @@ arbundles@^0.6.21: algosdk "^1.13.1" arweave "^1.11.4" arweave-stream-tx "^1.1.0" - avsc "https://github.com/Bundlr-Network/avsc#csp-fixes" + avsc "https://github.com/Irys-xyz/avsc#csp-fixes" axios "^0.21.3" base64url "^3.0.1" bs58 "^4.0.1" @@ -3375,28 +3631,29 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" + call-bind "^1.0.5" + is-array-buffer "^3.0.4" array-differ@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== -array-includes@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== +array-includes@^3.1.7: + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" is-string "^1.0.7" array-union@^1.0.1: @@ -3416,26 +3673,52 @@ array-uniq@^1.0.1: resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== -array.prototype.flat@^1.2.3, array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== +array.prototype.findlastindex@^1.2.3: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" + integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + +array.prototype.flat@^1.2.3, array.prototype.flat@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== +array.prototype.flatmap@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -3454,9 +3737,9 @@ arweave-stream-tx@^1.1.0: exponential-backoff "^3.1.0" arweave@^1.10.13, arweave@^1.11.4: - version "1.13.7" - resolved "https://registry.yarnpkg.com/arweave/-/arweave-1.13.7.tgz#cda8534c833baec372a7052c61f53b4e39a886d7" - integrity sha512-Hv+x2bSI6UyBHpuVbUDMMpMje1ETfpJWj52kKfz44O0IqDRi/LukOkkDUptup1p6OT6KP1/DdpnUnsNHoskFeA== + version "1.15.0" + resolved "https://registry.yarnpkg.com/arweave/-/arweave-1.15.0.tgz#56203c13badf28a0e420ca700d966e89a53c711b" + integrity sha512-sYfq2yJwkJLthRADsfHygNP+L7fTCyprTjOLYnpP8zaqwywddoNO3UpTk6XGjEiyyU3WfxoFLRLpzx+llZx1WA== dependencies: arconnect "^0.4.2" asn1.js "^5.4.1" @@ -3473,10 +3756,16 @@ asn1.js@^5.4.1: minimalistic-assert "^1.0.0" safer-buffer "^2.1.0" -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +assert@^2.0.0, assert@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-2.1.0.tgz#6d92a238d05dc02e7427c881fb8be81c8448b2dd" + integrity sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw== + dependencies: + call-bind "^1.0.2" + is-nan "^1.3.2" + object-is "^1.1.5" + object.assign "^4.1.4" + util "^0.12.5" async-retry@^1.3.3: version "1.3.3" @@ -3493,23 +3782,25 @@ async@^2.6.1: lodash "^4.17.14" async@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" -"avsc@https://github.com/Bundlr-Network/avsc#csp-fixes": +"avsc@https://github.com/Irys-xyz/avsc#csp-fixes": version "5.4.7" - resolved "https://github.com/Bundlr-Network/avsc#a730cc8018b79e114b6a3381bbb57760a24c6cef" + resolved "https://github.com/Irys-xyz/avsc#a730cc8018b79e114b6a3381bbb57760a24c6cef" axios@^0.21.3: version "0.21.4" @@ -3534,11 +3825,11 @@ axios@^0.27.2: form-data "^4.0.0" axios@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" - integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== + version "1.6.8" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" + integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" @@ -3587,29 +3878,29 @@ babel-plugin-module-resolver@^4.1.0: reselect "^4.0.0" resolve "^1.13.1" -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== +babel-plugin-polyfill-corejs2@^0.4.8: + version "0.4.10" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.10.tgz#276f41710b03a64f6467433cab72cbc2653c38b1" + integrity sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ== dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.6.1" + semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== +babel-plugin-polyfill-corejs3@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz#9eea32349d94556c2ad3ab9b82ebb27d4bf04a81" + integrity sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg== dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" + "@babel/helper-define-polyfill-provider" "^0.5.0" + core-js-compat "^3.34.0" -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== +babel-plugin-polyfill-regenerator@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz#8b0c8fc6434239e5d7b8a9d1f832bb2b0310f06a" + integrity sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg== dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" + "@babel/helper-define-polyfill-provider" "^0.5.0" babel-preset-current-node-syntax@^1.0.0: version "1.0.1" @@ -3689,14 +3980,14 @@ bigint-buffer@^1.1.5: bindings "^1.3.0" bignumber.js@^9.0.0, bignumber.js@^9.0.1, bignumber.js@^9.0.2: - version "9.1.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== bindings@^1.3.0: version "1.5.0" @@ -3737,11 +4028,6 @@ black-scholes@^1.1.0: resolved "https://registry.yarnpkg.com/black-scholes/-/black-scholes-1.1.0.tgz#2db77cfaf48ff9dae0d5d03693aeb02ef22f9b09" integrity sha512-23iaI490ai4pRclxWTM7BJyD8GzDibJCltLSX3xg86D3t8fzx67cqYSfL8WQLHnza1BhEeeA898XqpfRuQyQ2w== -blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== - bluebird@3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -3762,7 +4048,7 @@ bn.js@^4.0.0, bn.js@^4.11.9: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.0, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@^5.0.0, bn.js@^5.1.0, bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -3818,9 +4104,9 @@ braces@^3.0.2, braces@~3.0.2: fill-range "^7.0.1" breakword@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/breakword/-/breakword-1.0.5.tgz#fd420a417f55016736b5b615161cae1c8f819810" - integrity sha512-ex5W9DoOQ/LUEU3PMdLs9ua/CYZl1678NUkKOdUSi8Aw5F1idieaiRURCBFJCwVcrD1J8Iy3vfWSloaMwO2qFg== + version "1.0.6" + resolved "https://registry.yarnpkg.com/breakword/-/breakword-1.0.6.tgz#242506e7b871b7fad1bce8dc05cb0f2a129c12bd" + integrity sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw== dependencies: wcwidth "^1.0.1" @@ -3834,29 +4120,17 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserslist@^4.21.3, browserslist@^4.21.5: - version "4.21.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" - integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== +browserslist@^4.22.2, browserslist@^4.23.0: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== dependencies: - caniuse-lite "^1.0.30001449" - electron-to-chromium "^1.4.284" - node-releases "^2.0.8" - update-browserslist-db "^1.0.10" + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" -bs58@^4.0.0, bs58@^4.0.1: +bs58@4.0.1, bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== @@ -3870,15 +4144,6 @@ bs58@^5.0.0: dependencies: base-x "^4.0.0" -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -3901,11 +4166,6 @@ buffer-reverse@^1.0.1: resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" integrity sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - buffer@6.0.3, buffer@^6.0.2, buffer@^6.0.3, buffer@~6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -3923,9 +4183,9 @@ buffer@^5.5.0: ieee754 "^1.1.13" bufferutil@^4.0.1: - version "4.0.7" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.7.tgz#60c0d19ba2c992dd8273d3f73772ffc894c153ad" - integrity sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw== + version "4.0.8" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== dependencies: node-gyp-build "^4.3.0" @@ -3944,13 +4204,21 @@ caching-transform@^4.0.0: package-hash "^4.0.0" write-file-atomic "^3.0.0" -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +callsite@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + integrity sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ== callsites@^3.0.0: version "3.1.0" @@ -3976,10 +4244,10 @@ camelcase@^6.0.0, camelcase@^6.2.0, camelcase@^6.3.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001449: - version "1.0.30001481" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz#f58a717afe92f9e69d0e35ff64df596bfad93912" - integrity sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ== +caniuse-lite@^1.0.30001587: + version "1.0.30001609" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001609.tgz#fc34fad75c0c6d6d6303bdbceec2da8f203dabd6" + integrity sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA== capability@^0.2.5: version "0.2.5" @@ -3994,12 +4262,12 @@ chalk@4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" - integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== +chalk@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== -chalk@^2.0.0, chalk@^2.1.0: +chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -4046,7 +4314,7 @@ check-more-types@2.24.0: resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" integrity sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA== -chokidar@3.5.3, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1, chokidar@^3.5.3: +chokidar@3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -4061,12 +4329,27 @@ chokidar@3.5.3, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1, chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" -ci-info@^3.1.0, ci-info@^3.2.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" - integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== +chokidar@^3.5.1, chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +ci-info@^3.2.0, ci-info@^3.7.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: +cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== @@ -4075,9 +4358,9 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: safe-buffer "^5.0.1" cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== clean-stack@^2.0.0: version "2.2.0" @@ -4091,23 +4374,22 @@ cli-cursor@3.1.0, cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-spinners@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== cli-spinners@^2.5.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.8.0.tgz#e97a3e2bd00e6d85aa0c13d7f9e3ce236f7787fc" - integrity sha512-/eG5sJcvEIwxcdYM86k5tPwn0MUzkX5YY3eImTGpJOZgVe4SdTMY14vQpcxgBzJ0wXwAYrS8E+c3uHeK4JNyzQ== - -cli-truncate@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" - integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== - dependencies: - slice-ansi "^3.0.0" - string-width "^4.2.0" + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== cli-truncate@^3.1.0: version "3.1.0" @@ -4160,9 +4442,9 @@ co@^4.6.0: integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== color-convert@^1.9.0: version "1.9.3" @@ -4188,7 +4470,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^2.0.19: +colorette@^2.0.20: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -4200,7 +4482,17 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@*, commander@^10.0.0: +commander@*: + version "12.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.0.0.tgz#b929db6df8546080adfd004ab215ed48cf6f2592" + integrity sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA== + +commander@11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" + integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== + +commander@^10.0.0: version "10.0.1" resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== @@ -4240,19 +4532,24 @@ confusing-browser-globals@^1.0.9: resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.7.0: version "1.9.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== -core-js-compat@^3.25.1: - version "3.30.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.30.1.tgz#961541e22db9c27fc48bfc13a3cafa8734171dfe" - integrity sha512-d690npR7MC6P0gq4npTl5n2VQeNAmUrJ90n+MHiKS7W2+xno4o3F5GDEuylSdi6EJ3VssibSGXOa1r3YXD3Mhw== +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +core-js-compat@^3.31.0, core-js-compat@^3.34.0: + version "3.36.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.36.1.tgz#1818695d72c99c25d621dca94e6883e190cea3c8" + integrity sha512-Dk997v9ZCt3X/npqzyGdTlq6t7lDBhZwGvV94PKzDArjp7BTRm7WlDAXYd/OWdeFHO8OChQYRJNJvUCqCbrtKA== dependencies: - browserslist "^4.21.5" + browserslist "^4.23.0" -cosmiconfig@^7.0.0: +cosmiconfig@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== @@ -4263,7 +4560,7 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: +create-hash@^1.1.0, create-hash@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -4274,7 +4571,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@1.1.7, create-hmac@^1.1.4, create-hmac@^1.1.7: +create-hmac@1.1.7, create-hmac@^1.1.4: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -4287,11 +4584,11 @@ create-hmac@1.1.7, create-hmac@^1.1.4, create-hmac@^1.1.7: sha.js "^2.4.8" cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== dependencies: - node-fetch "2.6.7" + node-fetch "^2.6.12" cross-spawn@^5.1.0: version "5.1.0" @@ -4321,35 +4618,40 @@ crypto-js@^3.1.9-1: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== +csstype@^3.0.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + csv-generate@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-3.4.3.tgz#bc42d943b45aea52afa896874291da4b9108ffff" integrity sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw== -csv-generate@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-4.2.4.tgz#42cbe6b4e32fe59531fc1b57f07b5ab509e101d3" - integrity sha512-PvEwuRksnW30I1DlZnVuCVMOiff7ZoUXOCMQJ1c0DPKXQkIC87hWvqJ4ztO70ceQMQER1hp/Lajo8KIy7at1PA== +csv-generate@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-4.4.0.tgz#007575d825e537d9690e687f82fdf4a745e8c226" + integrity sha512-geM01acNPZ0wr4/9sKev5fCzFG/tsc/NbuFWrhLc47M1zQyUdEJH65+cxTLIVafEwhBjIYwQ7fdOL9roBqVltQ== csv-parse@^4.16.3: version "4.16.3" resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.16.3.tgz#7ca624d517212ebc520a36873c3478fa66efbaf7" integrity sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg== -csv-parse@^5.3.8: - version "5.3.8" - resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.3.8.tgz#c9919fbc5670fddec09a4b40e25365a2d11956d1" - integrity sha512-ird8lzMv9I64oqIVIHdaTbT7Yr55n2C/Nv6m1LxO7nddLEeI67468VQ9Ik+r6lwYbK9kTE1oSqAVcVKc/Uqx6g== +csv-parse@^5.5.5: + version "5.5.5" + resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.5.5.tgz#68a271a9092877b830541805e14c8a80e6a22517" + integrity sha512-erCk7tyU3yLWAhk6wvKxnyPtftuy/6Ak622gOO7BCJ05+TYffnPCJF905wmOQm+BpkX54OdAl8pveJwUdpnCXQ== csv-stringify@^5.6.5: version "5.6.5" resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-5.6.5.tgz#c6d74badda4b49a79bf4e72f91cce1e33b94de00" integrity sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A== -csv-stringify@^6.3.2: - version "6.3.2" - resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-6.3.2.tgz#0d5105dcf6f5a6605262d1a008883120684db164" - integrity sha512-dD9gfbxNKa5v90NHiE2Qd6F9I52GtJjGTfowwzqiNDZD/+NPW3h19d2Nvv311a8QUW11rYRobco27nvVAnCrLw== +csv-stringify@^6.4.6: + version "6.4.6" + resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-6.4.6.tgz#9ccf87cb8b017c96673a9fa061768c8ba83e8b98" + integrity sha512-h2V2XZ3uOTLilF5dPIptgUfN/o2ia/80Ie0Lly18LAnw5s8Eb7kt8rfxSUy24AztJZas9f6DPZpVlzDUtFt/ag== csv@^5.5.3: version "5.5.3" @@ -4362,16 +4664,43 @@ csv@^5.5.3: stream-transform "^2.1.3" csv@^6.0.5: - version "6.2.10" - resolved "https://registry.yarnpkg.com/csv/-/csv-6.2.10.tgz#5e94bac81c23d1a8eb30ab63cabbb68d2b1f34b7" - integrity sha512-aO1dkeMlzWHvtKOdiTeqt7G4SwF/JtJ2fYNOMtlrGiKERD+ASq+QZelGqpFCzHGvZSIhzDtwqRVEgPMkme2BQg== + version "6.3.8" + resolved "https://registry.yarnpkg.com/csv/-/csv-6.3.8.tgz#c38ad67093622b9fcbce0afaeaab29d1bddeeceb" + integrity sha512-gRh3yiT9bHBA5ka2yOpyFqAVu/ZpwWzajMUR/es0ljevAE88WyHBuMUy7jzd2o5j6LYQesEO/AyhbQ9BhbDXUA== + dependencies: + csv-generate "^4.4.0" + csv-parse "^5.5.5" + csv-stringify "^6.4.6" + stream-transform "^3.3.1" + +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== dependencies: - csv-generate "^4.2.4" - csv-parse "^5.3.8" - csv-stringify "^6.3.2" - stream-transform "^3.2.4" + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" -debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -4432,16 +4761,26 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== -define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== +define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== dependencies: + define-data-property "^1.0.1" has-property-descriptors "^1.0.0" object-keys "^1.1.1" @@ -4456,33 +4795,33 @@ delayed-stream@~1.0.0: integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== depcheck@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-1.4.3.tgz#faa4c143921f3fe25d5a7a633f9864327c250843" - integrity sha512-vy8xe1tlLFu7t4jFyoirMmOR7x7N601ubU9Gkifyr9z8rjBFtEdWHDBMqXyk6OkK+94NXutzddVXJuo0JlUQKQ== + version "1.4.7" + resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-1.4.7.tgz#57976e2fa43625f477efc0f19ad868ef94f8a26c" + integrity sha512-1lklS/bV5chOxwNKA/2XUUk/hPORp8zihZsXflr8x0kLwmcZ9Y9BsS6Hs3ssvA+2wUVbG0U2Ciqvm1SokNjPkA== dependencies: - "@babel/parser" "7.16.4" - "@babel/traverse" "^7.12.5" - "@vue/compiler-sfc" "^3.0.5" - camelcase "^6.2.0" - cosmiconfig "^7.0.0" - debug "^4.2.0" - deps-regex "^0.1.4" - ignore "^5.1.8" - is-core-module "^2.4.0" - js-yaml "^3.14.0" - json5 "^2.1.3" - lodash "^4.17.20" - minimatch "^3.0.4" + "@babel/parser" "^7.23.0" + "@babel/traverse" "^7.23.2" + "@vue/compiler-sfc" "^3.3.4" + callsite "^1.0.0" + camelcase "^6.3.0" + cosmiconfig "^7.1.0" + debug "^4.3.4" + deps-regex "^0.2.0" + findup-sync "^5.0.0" + ignore "^5.2.4" + is-core-module "^2.12.0" + js-yaml "^3.14.1" + json5 "^2.2.3" + lodash "^4.17.21" + minimatch "^7.4.6" multimatch "^5.0.0" please-upgrade-node "^3.2.0" - query-ast "^1.0.3" - readdirp "^3.5.0" + readdirp "^3.6.0" require-package-name "^2.0.1" - resolve "^1.18.1" - sass "^1.29.0" - scss-parser "^1.0.4" - semver "^7.3.2" - yargs "^16.1.0" + resolve "^1.22.3" + resolve-from "^5.0.0" + semver "^7.5.4" + yargs "^16.2.0" depd@^2.0.0: version "2.0.0" @@ -4494,10 +4833,15 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== -deps-regex@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deps-regex/-/deps-regex-0.1.4.tgz#518667b7691460a5e7e0a341be76eb7ce8090184" - integrity sha512-3tzwGYogSJi8HoG93R5x9NrdefZQOXgHgGih/7eivloOq6yC6O+yoFxZnkgP661twvfILONfoKRdF9GQOGx2RA== +deps-regex@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/deps-regex/-/deps-regex-0.2.0.tgz#3ee7ddae5fd784f3accf29d5a711aa6e10044137" + integrity sha512-PwuBojGMQAYbWkMXOY9Pd/NWCDNHVH12pnS7WHqZkTSeMESe4hwnKKRp0yR87g37113x4JPbo/oIvXY+s/f56Q== + +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== detect-indent@^6.0.0: version "6.1.0" @@ -4514,10 +4858,10 @@ diff-sequences@^28.1.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== -diff-sequences@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" - integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== diff@5.0.0: version "5.0.0" @@ -4530,9 +4874,9 @@ diff@^3.1.0: integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== diff@^5.0.0, diff@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== dir-glob@^3.0.1: version "3.0.1" @@ -4585,12 +4929,12 @@ ejs@^3.1.7: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.284: - version "1.4.377" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.377.tgz#7f326a0b2c1b96eca6bb65907addc505d0d15989" - integrity sha512-H3BYG6DW5Z+l0xcfXaicJGxrpA4kMlCxnN71+iNX+dBLkRMOdVJqFJiAmbNZZKA1zISpRg17JR03qGifXNsJtw== +electron-to-chromium@^1.4.668: + version "1.4.735" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.735.tgz#c32914ef2cd0a3a545a3def841d253a31a8a93be" + integrity sha512-pkYpvwg8VyOTQAeBqZ7jsmpCjko1Qc6We1ZtZCjRyYbT5v4AIUKDy5cQTRotQlSSZmMr8jqpEt6JtOj5k7lR7A== -elliptic@6.5.4, elliptic@^6.5.4: +elliptic@6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -4603,6 +4947,19 @@ elliptic@6.5.4, elliptic@^6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +elliptic@^6.5.4: + version "6.5.5" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.5.tgz#c715e09f78b6923977610d4c2346d6ce22e6dded" + integrity sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw== + 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" + email-addresses@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb" @@ -4630,13 +4987,26 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enquirer@^2.3.0, enquirer@~2.3.6: +enquirer@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + +enquirer@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== dependencies: ansi-colors "^4.1.1" +entities@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -4653,61 +5023,92 @@ error-polyfill@^0.1.3: o3 "^1.0.3" u3 "^0.1.1" -es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== - dependencies: - array-buffer-byte-length "^1.0.0" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" - get-symbol-description "^1.0.0" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" globalthis "^1.0.3" gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" is-callable "^1.2.7" - is-negative-zero "^2.0.2" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" + is-shared-array-buffer "^1.0.3" is-string "^1.0.7" - is-typed-array "^1.1.10" + is-typed-array "^1.1.13" is-weakref "^1.0.2" - object-inspect "^1.12.3" + object-inspect "^1.13.1" object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" + which-typed-array "^1.1.15" -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-shim-unscopables@^1.0.0: +es-object-atoms@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== dependencies: - has "^1.0.3" + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" es-to-primitive@^1.2.1: version "1.2.1" @@ -4736,9 +5137,9 @@ es6-promisify@^5.0.0: es6-promise "^4.0.3" escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" @@ -4756,61 +5157,63 @@ escape-string-regexp@^2.0.0: integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== eslint-config-prettier@^8.5.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348" - integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA== + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== +eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" -eslint-module-utils@^2.7.4: - version "2.8.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== +eslint-module-utils@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz#52f2404300c3bd33deece9d7372fb337cc1d7c34" + integrity sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q== dependencies: debug "^3.2.7" eslint-plugin-cypress@^2.12.1: - version "2.13.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.13.3.tgz#5fc1afdc939aaa7daa9181f651f2f35429733ff2" - integrity sha512-nAPjZE5WopCsgJwl3vHm5iafpV+ZRO76Z9hMyRygWhmg5ODXDPd+9MaPl7kdJ2azj+sO87H3P1PRnggIrz848g== + version "2.15.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.1.tgz#336afa7e8e27451afaf65aa359c9509e0a4f3a7b" + integrity sha512-eLHLWP5Q+I4j2AWepYq0PgFEei9/s5LvjuSqWrxurkg1YZ8ltxdvMNmdSf0drnsNo57CTgYY/NIHHLRSWejR7w== dependencies: - globals "^11.12.0" + globals "^13.20.0" eslint-plugin-eslint-plugin@^5.0.6: - version "5.0.8" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-5.0.8.tgz#b0a04e874a52176f129270b8773a4635ce5be14f" - integrity sha512-bxPMZ3L/+5YypErWQMKUI9XdkLpgqOOO0CgbtHjk5Zxzcg4EVsWYPy8duvGSLxSyR60LBIoXNzVMueEZ3/j0AQ== + version "5.5.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-5.5.1.tgz#ff54b5d0a5881e6150183ad025c5a7ee554b6545" + integrity sha512-9AmfZzcQ7QHwpzfAQpZ7xdtwHYViylmlnruCH0aV64/tuoH3igGXg91vr0e6ShLf/mrAYGqLw5LZ/gOxJeRXnw== dependencies: eslint-utils "^3.0.0" estraverse "^5.3.0" eslint-plugin-import@^2.26.0: - version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== - dependencies: - array-includes "^3.1.6" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" + version "2.29.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" + integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== + dependencies: + array-includes "^3.1.7" + array.prototype.findlastindex "^1.2.3" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" - has "^1.0.3" - is-core-module "^2.11.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.8.0" + hasown "^2.0.0" + is-core-module "^2.13.1" is-glob "^4.0.3" minimatch "^3.1.2" - object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" + object.fromentries "^2.0.7" + object.groupby "^1.0.1" + object.values "^1.1.7" + semver "^6.3.1" + tsconfig-paths "^3.15.0" eslint-plugin-json@^3.1.0: version "3.1.0" @@ -4821,9 +5224,9 @@ eslint-plugin-json@^3.1.0: vscode-json-languageservice "^4.1.6" eslint-plugin-markdown@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.0.tgz#69a63ab3445076a3c2eb6fce6f5114785b19d318" - integrity sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.1.tgz#fc6765bdb5f82a75e2438d7fac619602f2abc38c" + integrity sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A== dependencies: mdast-util-from-markdown "^0.8.5" @@ -4835,9 +5238,9 @@ eslint-plugin-prettier@^4.2.1: prettier-linter-helpers "^1.0.0" eslint-plugin-sort-class-members@^1.15.2: - version "1.17.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.17.1.tgz#bf76796953dc0711854a322f5203fb1ba829ffa0" - integrity sha512-qLUeVJDGRUAww4ndgyTux07b1NGSeyYo/tA6/jD66U9LDoQsvZ/n+Yd/as7lc6NVT2wDfFh9256k9ktOnE6iQA== + version "1.20.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.20.0.tgz#88ea3d53b2ffb319dba1049c28e20797685a0b9e" + integrity sha512-xNaik4GQ/pRwd1soIVI28HEXZbrWoLR5krau2+E8YcHj7N09UviPg5mYhf/rELG29bIFJdXDOFJazN90+luMOw== eslint-scope@^5.1.1: version "5.1.1" @@ -4847,10 +5250,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" - integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -4867,32 +5270,33 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" - integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.23.0: - version "8.39.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.39.0.tgz#7fd20a295ef92d43809e914b70c39fd5a23cf3f1" - integrity sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og== + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.4.0" - "@eslint/eslintrc" "^2.0.2" - "@eslint/js" "8.39.0" - "@humanwhocodes/config-array" "^0.11.8" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.0" - eslint-visitor-keys "^3.4.0" - espree "^9.5.1" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -4900,32 +5304,29 @@ eslint@^8.23.0: find-up "^5.0.0" glob-parent "^6.0.2" globals "^13.19.0" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.5.1: - version "9.5.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4" - integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.8.0" + acorn "^8.9.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.0" + eslint-visitor-keys "^3.4.1" esprima@^4.0.0: version "4.0.1" @@ -4972,43 +5373,21 @@ esutils@^2.0.2: integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== ethereum-bloom-filters@^1.0.6: - version "1.0.10" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" - integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.1.0.tgz#b3fc1eb789509ee30db0bf99a2988ccacb8d0397" + integrity sha512-J1gDRkLpuGNvWYzWslBQR9cDV4nd4kfvVTE/Wy4Kkm4yb3EYRSlyi0eB/inTsSTTVyA0+HyzHgbr95Fn/Z1fSw== dependencies: - js-sha3 "^0.8.0" - -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" + "@noble/hashes" "^1.4.0" -ethereumjs-util@^7.1.0: - version "7.1.5" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" - integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== +ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz#1352270ed3b339fe25af5ceeadcf1b9c8e30768a" + integrity sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA== dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" + "@noble/curves" "1.3.0" + "@noble/hashes" "1.3.3" + "@scure/bip32" "1.3.3" + "@scure/bip39" "1.2.2" ethers@^5.5.1: version "5.7.2" @@ -5072,13 +5451,10 @@ eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== execa@5.1.1, execa@^5.0.0: version "5.1.1" @@ -5095,10 +5471,10 @@ execa@5.1.1, execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" - integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== +execa@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" + integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.1" @@ -5115,16 +5491,23 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== + dependencies: + homedir-polyfill "^1.0.1" + expect@*, expect@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.5.0.tgz#68c0509156cb2a0adb8865d413b137eeaae682f7" - integrity sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg== + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== dependencies: - "@jest/expect-utils" "^29.5.0" - jest-get-type "^29.4.3" - jest-matcher-utils "^29.5.0" - jest-message-util "^29.5.0" - jest-util "^29.5.0" + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" expect@^28.1.3: version "28.1.3" @@ -5167,9 +5550,9 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== fast-glob@3.2.7: version "3.2.7" @@ -5183,9 +5566,9 @@ fast-glob@3.2.7: micromatch "^4.0.4" fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -5209,9 +5592,9 @@ fast-stable-stringify@^1.0.0: integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== dependencies: reusify "^1.0.4" @@ -5241,7 +5624,7 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -filelist@^1.0.1: +filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== @@ -5333,12 +5716,23 @@ find@^0.3.0: dependencies: traverse-chain "~0.1.0" +findup-sync@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-5.0.0.tgz#54380ad965a7edca00cc8f63113559aadc541bd2" + integrity sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.3" + micromatch "^4.0.4" + resolve-dir "^1.0.1" + flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: - flatted "^3.1.0" + flatted "^3.2.9" + keyv "^4.5.3" rimraf "^3.0.2" flat@^5.0.2: @@ -5346,15 +5740,15 @@ flat@^5.0.2: resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -follow-redirects@^1.14.0, follow-redirects@^1.14.7, follow-redirects@^1.14.9, follow-redirects@^1.15.0: - version "1.15.4" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" - integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== +follow-redirects@^1.14.0, follow-redirects@^1.14.7, follow-redirects@^1.14.9, follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== for-each@^0.3.3: version "0.3.3" @@ -5371,15 +5765,6 @@ foreground-child@^2.0.0: cross-spawn "^7.0.0" signal-exit "^3.0.2" -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -5437,26 +5822,26 @@ fs.realpath@^1.0.0: integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" -functions-have-names@^1.2.2, functions-have-names@^1.2.3: +functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -5471,14 +5856,16 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== dependencies: - function-bind "^1.1.1" - has "^1.0.3" + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" has-symbols "^1.0.3" + hasown "^2.0.0" get-package-type@^0.1.0: version "0.1.0" @@ -5490,13 +5877,14 @@ get-stream@^6.0.0, get-stream@^6.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" gh-pages@^4.0.0: version "4.0.0" @@ -5537,17 +5925,16 @@ glob@7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +glob@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^5.0.1" once "^1.3.0" - path-is-absolute "^1.0.0" glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" @@ -5561,15 +5948,35 @@ glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.1.0, globals@^11.12.0: +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg== + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== +globals@^13.19.0, globals@^13.20.0: + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" @@ -5620,6 +6027,11 @@ grapheme-splitter@^1.0.4: resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" @@ -5645,36 +6057,29 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== dependencies: - get-intrinsic "^1.1.1" + es-define-property "^1.0.0" -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== +has-proto@^1.0.1, has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== dependencies: - function-bind "^1.1.1" + has-symbols "^1.0.3" hash-base@^3.0.0: version "3.1.0" @@ -5685,7 +6090,7 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== @@ -5701,6 +6106,13 @@ hasha@^5.0.0: is-stream "^2.0.0" type-fest "^0.8.0" +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -5720,6 +6132,13 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -5787,17 +6206,12 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.0.4, ignore@^5.1.8, ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -immutable@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" - integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== +ignore@^5.0.4, ignore@^5.2.0, ignore@^5.2.4: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -5828,10 +6242,15 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + inquirer@^8.2.0: - version "8.2.5" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.5.tgz#d8654a7542c35a9b9e069d27e2df4858784d54f8" - integrity sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ== + version "8.2.6" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" + integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg== dependencies: ansi-escapes "^4.2.1" chalk "^4.1.1" @@ -5847,15 +6266,15 @@ inquirer@^8.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" - wrap-ansi "^7.0.0" + wrap-ansi "^6.0.1" -internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" + es-errors "^1.3.0" + hasown "^2.0.0" side-channel "^1.0.4" invariant@2.2.4: @@ -5878,14 +6297,21 @@ is-alphanumerical@^1.0.0: is-alphabetical "^1.0.0" is-decimal "^1.0.0" -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" + get-intrinsic "^1.2.1" is-arrayish@^0.2.1: version "0.2.1" @@ -5926,19 +6352,19 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-ci@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" - integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== +is-core-module@^2.12.0, is-core-module@^2.13.0, is-core-module@^2.13.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: - ci-info "^3.2.0" + hasown "^2.0.0" -is-core-module@^2.11.0, is-core-module@^2.4.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" - integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== dependencies: - has "^1.0.3" + is-typed-array "^1.1.13" is-date-object@^1.0.1: version "1.0.5" @@ -5977,6 +6403,13 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -6004,10 +6437,18 @@ is-module@^1.0.0: resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-nan@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" + integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== is-number-object@^1.0.4: version "1.0.7" @@ -6051,12 +6492,12 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" is-stream@^2.0.0: version "2.0.1" @@ -6089,16 +6530,12 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== +is-typed-array@^1.1.13, is-typed-array@^1.1.3: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" + which-typed-array "^1.1.14" is-typedarray@^1.0.0: version "1.0.0" @@ -6117,7 +6554,7 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-windows@^1.0.0, is-windows@^1.0.2: +is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -6129,10 +6566,10 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== isexe@^2.0.0: version "2.0.0" @@ -6144,10 +6581,15 @@ isomorphic-ws@^4.0.1: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== +isomorphic-ws@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" + integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== + istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== istanbul-lib-hook@^3.0.0: version "3.0.0" @@ -6190,12 +6632,12 @@ istanbul-lib-processinfo@^2.0.2: uuid "^8.3.2" istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" + make-dir "^4.0.0" supports-color "^7.1.0" istanbul-lib-source-maps@^4.0.0: @@ -6208,41 +6650,22 @@ istanbul-lib-source-maps@^4.0.0: source-map "^0.6.1" istanbul-reports@^3.0.2, istanbul-reports@^3.1.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== + version "3.1.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" jake@^10.8.5: - version "10.8.5" - resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.5.tgz#f2183d2c59382cb274226034543b9c03b8164c46" - integrity sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw== + version "10.8.7" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f" + integrity sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w== dependencies: async "^3.2.3" chalk "^4.0.2" - filelist "^1.0.1" - minimatch "^3.0.4" - -jayson@^3.4.4: - version "3.7.0" - resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.7.0.tgz#b735b12d06d348639ae8230d7a1e2916cb078f25" - integrity sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ== - dependencies: - "@types/connect" "^3.4.33" - "@types/node" "^12.12.54" - "@types/ws" "^7.4.4" - JSONStream "^1.3.5" - commander "^2.20.3" - delay "^5.0.0" - es6-promisify "^5.0.0" - eyes "^0.1.8" - isomorphic-ws "^4.0.1" - json-stringify-safe "^5.0.1" - lodash "^4.17.20" - uuid "^8.3.2" - ws "^7.4.5" + filelist "^1.0.4" + minimatch "^3.1.2" jayson@^4.1.0: version "4.1.0" @@ -6325,15 +6748,15 @@ jest-diff@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-diff@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.5.0.tgz#e0d83a58eb5451dcc1fa61b1c3ee4e8f5a290d63" - integrity sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw== +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== dependencies: chalk "^4.0.0" - diff-sequences "^29.4.3" - jest-get-type "^29.4.3" - pretty-format "^29.5.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" jest-docblock@^28.1.1: version "28.1.1" @@ -6370,10 +6793,10 @@ jest-get-type@^28.0.2: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== -jest-get-type@^29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5" - integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== jest-haste-map@^28.1.1, jest-haste-map@^28.1.3: version "28.1.3" @@ -6412,15 +6835,15 @@ jest-matcher-utils@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-matcher-utils@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz#d957af7f8c0692c5453666705621ad4abc2c59c5" - integrity sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw== +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== dependencies: chalk "^4.0.0" - jest-diff "^29.5.0" - jest-get-type "^29.4.3" - pretty-format "^29.5.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" jest-message-util@^28.1.1, jest-message-util@^28.1.3: version "28.1.3" @@ -6437,18 +6860,18 @@ jest-message-util@^28.1.1, jest-message-util@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.5.0.tgz#1f776cac3aca332ab8dd2e3b41625435085c900e" - integrity sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA== +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^29.5.0" + pretty-format "^29.7.0" slash "^3.0.0" stack-utils "^2.0.3" @@ -6608,12 +7031,12 @@ jest-util@^28.1.1, jest-util@^28.1.3: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f" - integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ== +jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== dependencies: - "@jest/types" "^29.5.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" @@ -6665,21 +7088,16 @@ jest-worker@^28.1.1, jest-worker@^28.1.3: supports-color "^8.0.0" joi@^17.7.0: - version "17.9.2" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.9.2.tgz#8b2e4724188369f55451aebd1d0b1d9482470690" - integrity sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw== + version "17.12.3" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.12.3.tgz#944646979cd3b460178547b12ba37aca8482f63d" + integrity sha512-2RRziagf555owrm9IRVtdKynOBeITiDpuZqIpgwqXShPncPKNiRQoiGsl/T8SQdq+8ugRzH2LqY67irr2y/d+g== dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" + "@hapi/hoek" "^9.3.0" + "@hapi/topo" "^5.1.0" + "@sideway/address" "^4.1.5" "@sideway/formula" "^3.0.1" "@sideway/pinpoint" "^2.0.0" -js-sdsl@^4.1.4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" - integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== - js-sha256@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" @@ -6707,7 +7125,7 @@ js-yaml@4.1.0, js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -js-yaml@^3.10.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.6.1: +js-yaml@^3.10.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.14.1, js-yaml@^3.6.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -6732,6 +7150,11 @@ json-bigint@^1.0.0: dependencies: bignumber.js "^9.0.0" +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -6764,7 +7187,7 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.1.3, json5@^2.2.2: +json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -6774,11 +7197,16 @@ jsonc-parser@3.0.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== -jsonc-parser@3.2.0, jsonc-parser@^3.0.0, jsonc-parser@^3.2.0: +jsonc-parser@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== +jsonc-parser@^3.0.0, jsonc-parser@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -6800,20 +7228,27 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -just-extend@^4.0.2: - version "4.2.1" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" - integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg== +just-extend@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947" + integrity sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw== -keccak@^3.0.0, keccak@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" - integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== +keccak@^3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" + integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== dependencies: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" readable-stream "^3.6.0" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -6853,37 +7288,32 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lint-staged@^13.2.3: - version "13.2.3" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.2.3.tgz#f899aad6c093473467e9c9e316e3c2d8a28f87a7" - integrity sha512-zVVEXLuQIhr1Y7R7YAWx4TZLdvuzk7DnmrsTNL0fax6Z3jrpFcas+vKbzxhhvp6TA55m1SQuWkpzI1qbfDZbAg== + version "13.3.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.3.0.tgz#7965d72a8d6a6c932f85e9c13ccf3596782d28a5" + integrity sha512-mPRtrYnipYYv1FEE134ufbWpeggNTo+O/UPzngoaKzbzHAthvR55am+8GfHTnqNRQVRRrYQLGW9ZyUoD7DsBHQ== dependencies: - chalk "5.2.0" - cli-truncate "^3.1.0" - commander "^10.0.0" - debug "^4.3.4" - execa "^7.0.0" + chalk "5.3.0" + commander "11.0.0" + debug "4.3.4" + execa "7.2.0" lilconfig "2.1.0" - listr2 "^5.0.7" - micromatch "^4.0.5" - normalize-path "^3.0.0" - object-inspect "^1.12.3" - pidtree "^0.6.0" - string-argv "^0.3.1" - yaml "^2.2.2" + listr2 "6.6.1" + micromatch "4.0.5" + pidtree "0.6.0" + string-argv "0.3.2" + yaml "2.3.1" -listr2@^5.0.7: - version "5.0.8" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.8.tgz#a9379ffeb4bd83a68931a65fb223a11510d6ba23" - integrity sha512-mC73LitKHj9w6v30nLNGPetZIlfpUniNSsxxrbaPcWOjDb92SHPzJPi/t+v1YC/lxKz/AJ9egOjww0qUuFxBpA== +listr2@6.6.1: + version "6.6.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-6.6.1.tgz#08b2329e7e8ba6298481464937099f4a2cd7f95d" + integrity sha512-+rAXGHh0fkEWdXBmX+L6mmfmXmXvDGEKzkjxO+8mP3+nI/r/CWznVBvsibXdxda9Zz0OW2e2ikphN3OwCT/jSg== dependencies: - cli-truncate "^2.1.0" - colorette "^2.0.19" - log-update "^4.0.0" - p-map "^4.0.0" + cli-truncate "^3.1.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^5.0.1" rfdc "^1.3.0" - rxjs "^7.8.0" - through "^2.3.8" - wrap-ansi "^7.0.0" + wrap-ansi "^8.1.0" load-yaml-file@^0.2.0: version "0.2.0" @@ -6942,7 +7372,7 @@ lodash.startcase@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" integrity sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg== -lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.14, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6955,17 +7385,18 @@ log-symbols@4.1.0, log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -log-update@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" - integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== +log-update@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-5.0.1.tgz#9e928bf70cb183c1f0c9e91d9e6b7115d597ce09" + integrity sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw== dependencies: - ansi-escapes "^4.3.0" - cli-cursor "^3.1.0" - slice-ansi "^4.0.0" - wrap-ansi "^6.2.0" + ansi-escapes "^5.0.0" + cli-cursor "^4.0.0" + slice-ansi "^5.0.0" + strip-ansi "^7.0.1" + wrap-ansi "^8.0.1" -loose-envify@^1.0.0: +loose-envify@^1.0.0, loose-envify@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -7013,6 +7444,13 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.8" +magic-string@^0.30.7: + version "0.30.9" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.9.tgz#8927ae21bfdd856310e07a1bc8dd5e73cb6c251d" + integrity sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + make-dir@^3.0.0, make-dir@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -7020,6 +7458,13 @@ make-dir@^3.0.0, make-dir@^3.0.2: dependencies: semver "^6.0.0" +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -7115,6 +7560,11 @@ merkletreejs@^0.2.32: treeify "^1.1.0" web3-utils "^1.3.4" +micro-ftch@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" + integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== + micromark@~2.11.0: version "2.11.4" resolved "https://registry.yarnpkg.com/micromark/-/micromark-2.11.4.tgz#d13436138eea826383e822449c9a5c50ee44665a" @@ -7123,7 +7573,7 @@ micromark@~2.11.0: debug "^4.0.0" parse-entities "^2.0.0" -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: +micromatch@4.0.5, micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -7201,7 +7651,7 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^7.1.3: +minimatch@^7.1.3, minimatch@^7.4.6: version "7.4.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb" integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== @@ -7223,9 +7673,9 @@ minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.7: integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mixme@^0.5.1: - version "0.5.9" - resolved "https://registry.yarnpkg.com/mixme/-/mixme-0.5.9.tgz#a5a58e17354632179ff3ce5b0fc130899c8ba81c" - integrity sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw== + version "0.5.10" + resolved "https://registry.yarnpkg.com/mixme/-/mixme-0.5.10.tgz#d653b2984b75d9018828f1ea333e51717ead5f51" + integrity sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q== mkdirp@^0.5.1: version "0.5.6" @@ -7235,9 +7685,9 @@ mkdirp@^0.5.1: minimist "^1.2.6" mocha@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" - integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + version "10.4.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.4.0.tgz#ed03db96ee9cfc6d20c56f8e2af07b961dbae261" + integrity sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA== dependencies: ansi-colors "4.1.1" browser-stdout "1.3.1" @@ -7246,13 +7696,12 @@ mocha@^10.2.0: diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" - glob "7.2.0" + glob "8.1.0" he "1.2.0" js-yaml "4.1.0" log-symbols "4.1.0" minimatch "5.0.1" ms "2.1.3" - nanoid "3.3.3" serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" @@ -7305,15 +7754,10 @@ mylas@^2.1.9: resolved "https://registry.yarnpkg.com/mylas/-/mylas-2.1.13.tgz#1e23b37d58fdcc76e15d8a5ed23f9ae9fc0cbdf4" integrity sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg== -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - -nanoid@^3.3.6: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== natural-compare-lite@^1.4.0: version "1.4.0" @@ -7362,15 +7806,15 @@ near-seed-phrase@^0.2.0: tweetnacl "^1.0.2" nise@^5.1.1, nise@^5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.4.tgz#491ce7e7307d4ec546f5a659b2efe94a18b4bbc0" - integrity sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg== + version "5.1.9" + resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.9.tgz#0cb73b5e4499d738231a473cd89bd8afbb618139" + integrity sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww== dependencies: - "@sinonjs/commons" "^2.0.0" - "@sinonjs/fake-timers" "^10.0.2" - "@sinonjs/text-encoding" "^0.7.1" - just-extend "^4.0.2" - path-to-regexp "^1.7.0" + "@sinonjs/commons" "^3.0.0" + "@sinonjs/fake-timers" "^11.2.2" + "@sinonjs/text-encoding" "^0.7.2" + just-extend "^6.2.0" + path-to-regexp "^6.2.1" no-case@^3.0.4: version "3.0.4" @@ -7390,21 +7834,7 @@ node-addon-api@^3.2.1: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-fetch@^2.6.1, node-fetch@^2.6.7: - version "2.6.9" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" - integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== - dependencies: - whatwg-url "^5.0.0" - -node-fetch@^2.6.12: +node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -7412,9 +7842,9 @@ node-fetch@^2.6.12: whatwg-url "^5.0.0" node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" - integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + version "4.8.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd" + integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== node-int64@^0.4.0: version "0.4.0" @@ -7428,10 +7858,10 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-releases@^2.0.8: - version "2.0.10" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" - integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== normalize-package-data@^2.5.0: version "2.5.0" @@ -7456,9 +7886,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + version "5.3.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" + integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== dependencies: path-key "^4.0.0" @@ -7506,13 +7936,13 @@ nx@14.7.5: yargs "^17.4.0" yargs-parser "21.0.1" -nx@14.8.8, nx@^14.8.6: - version "14.8.8" - resolved "https://registry.yarnpkg.com/nx/-/nx-14.8.8.tgz#f33e8ca6bd197a5eaba93ff751ace4c33f2c3bed" - integrity sha512-hXoTcBjY+3+OituiSE9G44CjwfbFVEtw6W9Hl0DxcFW+Vb9V+sa/LHAQbIq1GXvr819sBduP0bncowUoOq6iBg== +nx@14.8.9, nx@^14.8.6: + version "14.8.9" + resolved "https://registry.yarnpkg.com/nx/-/nx-14.8.9.tgz#792bea7ed556551c45dd04b7f29353f5f886177e" + integrity sha512-X29mxovtXkrqcYNndTNMUOrtO3tkSZF0GkdsQ16kCxo4YIqUVVOpM7IzZYx+JxO6fVDFMlK7eGU2C2lTHz/MSQ== dependencies: - "@nrwl/cli" "14.8.8" - "@nrwl/tao" "14.8.8" + "@nrwl/cli" "14.8.9" + "@nrwl/tao" "14.8.9" "@parcel/watcher" "2.0.4" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "^3.0.0-rc.18" @@ -7592,34 +8022,61 @@ object-assign@^4.0.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + +object-is@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.6.tgz#1a6a53aed2dd8f7e6775ff870bea58545956ab07" + integrity sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== +object.assign@^4.1.4, object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" + call-bind "^1.0.5" + define-properties "^1.2.1" has-symbols "^1.0.3" object-keys "^1.1.1" -object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== +object.fromentries@^2.0.7: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +object.groupby@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + +object.values@^1.1.7: + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" once@^1.3.0, once@^1.4.0: version "1.4.0" @@ -7651,17 +8108,17 @@ open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" ora@^5.4.1: version "5.4.1" @@ -7742,13 +8199,6 @@ p-map@^3.0.0: dependencies: aggregate-error "^3.0.0" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -7798,6 +8248,11 @@ parse-json@^5.0.0, parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -7828,12 +8283,10 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" +path-to-regexp@^6.2.1: + version "6.2.2" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" + integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== path-type@^4.0.0: version "4.0.0" @@ -7847,7 +8300,7 @@ pause-stream@0.0.11: dependencies: through "~2.3" -pbkdf2@^3.0.17, pbkdf2@^3.0.9: +pbkdf2@^3.0.9: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -7868,7 +8321,7 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatc resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pidtree@^0.6.0: +pidtree@0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== @@ -7896,9 +8349,9 @@ pinkie@^2.0.0: integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" @@ -7922,25 +8375,30 @@ please-upgrade-node@^3.2.0: semver-compare "^1.0.0" plimit-lit@^1.2.6: - version "1.5.0" - resolved "https://registry.yarnpkg.com/plimit-lit/-/plimit-lit-1.5.0.tgz#f66df8a7041de1e965c4f1c0697ab486968a92a5" - integrity sha512-Eb/MqCb1Iv/ok4m1FqIXqvUKPISufcjZ605hl3KM/n8GaX8zfhtgdLwZU3vKjuHGh2O9Rjog/bHTq8ofIShdng== + version "1.6.1" + resolved "https://registry.yarnpkg.com/plimit-lit/-/plimit-lit-1.6.1.tgz#a34594671b31ee8e93c72d505dfb6852eb72374a" + integrity sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA== dependencies: - queue-lit "^1.5.0" + queue-lit "^1.5.1" + +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== -postcss@^8.1.10: - version "8.4.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.23.tgz#df0aee9ac7c5e53e1075c24a3613496f9e6552ab" - integrity sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA== +postcss@^8.4.35: + version "8.4.38" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" + integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== dependencies: - nanoid "^3.3.6" + nanoid "^3.3.7" picocolors "^1.0.0" - source-map-js "^1.0.2" + source-map-js "^1.2.0" preferred-pm@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/preferred-pm/-/preferred-pm-3.0.3.tgz#1b6338000371e3edbce52ef2e4f65eb2e73586d6" - integrity sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ== + version "3.1.3" + resolved "https://registry.yarnpkg.com/preferred-pm/-/preferred-pm-3.1.3.tgz#4125ea5154603136c3b6444e5f5c94ecf90e4916" + integrity sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w== dependencies: find-up "^5.0.0" find-yarn-workspace-root2 "1.2.16" @@ -7974,12 +8432,12 @@ pretty-format@^28.1.1, pretty-format@^28.1.3: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^29.5.0: - version "29.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.5.0.tgz#283134e74f70e2e3e7229336de0e4fce94ccde5a" - integrity sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw== +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== dependencies: - "@jest/schemas" "^29.4.3" + "@jest/schemas" "^29.6.3" ansi-styles "^5.0.0" react-is "^18.0.0" @@ -8013,22 +8471,14 @@ pseudomap@^1.0.2: integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== punycode@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -query-ast@^1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/query-ast/-/query-ast-1.0.5.tgz#60f60593e8ea085082aaf9f316631a5cc070074a" - integrity sha512-JK+1ma4YDuLjvKKcz9JZ70G+CM9qEOs/l1cZzstMMfwKUabTJ9sud5jvDGrUNuv03yKUgs82bLkHXJkDyhRmBw== - dependencies: - invariant "2.2.4" - lodash "^4.17.21" + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -queue-lit@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/queue-lit/-/queue-lit-1.5.0.tgz#8197fdafda1edd615c8a0fc14c48353626e5160a" - integrity sha512-IslToJ4eiCEE9xwMzq3viOO5nH8sUWUCwoElrhNMozzr9IIt2qqvB4I+uHu/zJTQVqc9R5DFwok4ijNK1pU3fA== +queue-lit@^1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/queue-lit/-/queue-lit-1.5.2.tgz#83c24d4f4764802377b05a6e5c73017caf3f8747" + integrity sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw== queue-microtask@^1.2.2: version "1.2.3" @@ -8057,6 +8507,13 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +react@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -8095,7 +8552,7 @@ readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdirp@^3.5.0, readdirp@~3.6.0: +readdirp@^3.6.0, readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== @@ -8111,9 +8568,9 @@ redent@^3.0.0: strip-indent "^3.0.0" regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== + version "10.1.1" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz#6b0e05489d9076b04c436f318d9b067bba459480" + integrity sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q== dependencies: regenerate "^1.4.2" @@ -8122,31 +8579,27 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - regenerator-runtime@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" - integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== +regenerator-transform@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4" + integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== dependencies: "@babel/runtime" "^7.8.4" -regexp.prototype.flags@^1.4.3: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - functions-have-names "^1.2.3" + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" regexpu-core@^5.3.1: version "5.3.2" @@ -8194,6 +8647,14 @@ reselect@^4.0.0: resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg== + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -8214,12 +8675,12 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== -resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== +resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.3, resolve@^1.22.4: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - is-core-module "^2.11.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -8231,6 +8692,14 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retry@0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" @@ -8242,9 +8711,9 @@ reusify@^1.0.4: integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" @@ -8261,13 +8730,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.2.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" - integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== - dependencies: - bn.js "^5.2.0" - rollup-plugin-polyfill-node@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.9.0.tgz#09cf1a74244a74a5c5007f5fd386d320610ec1d8" @@ -8300,9 +8762,9 @@ rollup@^2.72.0: fsevents "~2.3.2" rpc-websockets@^7.5.1: - version "7.5.1" - resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.1.tgz#e0a05d525a97e7efc31a0617f093a13a2e10c401" - integrity sha512-kGFkeTsmd37pHPMaHIgN1LVKXMi0JD782v4Ds9ZKtLlwdTKjn+CxM9A9/gLT2LaOuEcEFGL98h1QWQtlOIdW0w== + version "7.9.0" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.9.0.tgz#a3938e16d6f134a3999fdfac422a503731bf8973" + integrity sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw== dependencies: "@babel/runtime" "^7.17.2" eventemitter3 "^4.0.7" @@ -8338,18 +8800,28 @@ rxjs@^7.5.5, rxjs@^7.8.0: dependencies: tslib "^2.1.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" + call-bind "^1.0.6" + es-errors "^1.3.0" is-regex "^1.1.4" "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: @@ -8357,29 +8829,12 @@ safe-regex-test@^1.0.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass@^1.29.0: - version "1.62.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.62.1.tgz#caa8d6bf098935bc92fc73fa169fb3790cacd029" - integrity sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A== - dependencies: - chokidar ">=3.0.0 <4.0.0" - immutable "^4.0.0" - source-map-js ">=0.6.2 <2.0.0" - -scrypt-js@3.0.1, scrypt-js@^3.0.0: +scrypt-js@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== -scss-parser@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/scss-parser/-/scss-parser-1.0.6.tgz#cd1ba01ee32db19322c8df2badd26da8f166b1c1" - integrity sha512-SH3TaoaJFzfAtqs3eG1j5IuHJkeEW5rKUPIjIN+ZorLAyJLHItQGnsgwHk76v25GtLtpT9IqfAcqK4vFWdiw+w== - dependencies: - invariant "2.2.4" - lodash "4.17.21" - -secp256k1@^4.0.1, secp256k1@^4.0.2: +secp256k1@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== @@ -8393,7 +8848,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== -"semver@2 || 3 || 4 || 5", semver@^5.4.1: +"semver@2 || 3 || 4 || 5": version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -8405,15 +8860,15 @@ semver@7.3.4: dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: +semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.2, semver@^7.3.5, semver@^7.3.7: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== +semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== dependencies: lru-cache "^6.0.0" @@ -8436,10 +8891,27 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + 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" + +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" setprototypeof@1.2.0: version "1.2.0" @@ -8479,9 +8951,9 @@ shebang-regex@^3.0.0: integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shiki@^0.14.1: - version "0.14.2" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.2.tgz#d51440800b701392b31ce2336036058e338247a1" - integrity sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A== + version "0.14.7" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" + integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== dependencies: ansi-sequence-parser "^1.1.0" jsonc-parser "^3.2.0" @@ -8489,13 +8961,14 @@ shiki@^0.14.1: vscode-textmate "^8.0.0" side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" @@ -8515,12 +8988,12 @@ sinon@^13.0.1: supports-color "^7.2.0" sinon@^15.0.1: - version "15.0.4" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-15.0.4.tgz#bcca6fef19b14feccc96473f0d7adc81e0bc5268" - integrity sha512-uzmfN6zx3GQaria1kwgWGeKiXSSbShBbue6Dcj0SI8fiCNFbiUDqKl57WFlY5lyhxZVUKmXvzgG2pilRQCBwWg== + version "15.2.0" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-15.2.0.tgz#5e44d4bc5a9b5d993871137fd3560bebfac27565" + integrity sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw== dependencies: "@sinonjs/commons" "^3.0.0" - "@sinonjs/fake-timers" "^10.0.2" + "@sinonjs/fake-timers" "^10.3.0" "@sinonjs/samsam" "^8.0.0" diff "^5.1.0" nise "^5.1.4" @@ -8531,24 +9004,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" - integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - slice-ansi@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" @@ -8577,10 +9032,10 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-js@^1.0.2, source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== source-map-support@0.5.13: version "0.5.13" @@ -8645,9 +9100,9 @@ spdx-correct@^3.0.0: spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + version "2.5.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" + integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== spdx-expression-parse@^3.0.0: version "3.0.1" @@ -8658,9 +9113,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.13" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" - integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + version "3.0.17" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c" + integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== split@0.3: version "0.3.3" @@ -8722,12 +9177,12 @@ stream-transform@^2.1.3: dependencies: mixme "^0.5.1" -stream-transform@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/stream-transform/-/stream-transform-3.2.4.tgz#cc37b7950a43f97a89b6472745ec9ef9850c4948" - integrity sha512-YoZm/eoh6f/MH7uHkq+NK3fx3JkyXbck7FcTpJavwEUg0aMINqMPkDj5uNW0CoRy7c/2NSJm0HvoyFv6dVauPA== +stream-transform@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/stream-transform/-/stream-transform-3.3.1.tgz#f8bb6a811e505056b6a215c466e4c2760347189f" + integrity sha512-BL8pv9QL8Ikd11oZwlRDp1qYMhGR0i50zI9ltoijKGc4ubQWal/Rc4p6SYJp1TBOGpE0uAGchwbxOZ1ycwTuqQ== -string-argv@^0.3.1: +string-argv@0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== @@ -8749,7 +9204,7 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^5.0.0: +string-width@^5.0.0, string-width@^5.0.1: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== @@ -8758,32 +9213,33 @@ string-width@^5.0.0: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" string_decoder@^1.1.1: version "1.3.0" @@ -8840,7 +9296,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -8930,12 +9386,12 @@ terminal-link@^2.0.0: supports-hyperlinks "^2.0.0" terser@^5.0.0: - version "5.17.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.1.tgz#948f10830454761e2eeedc6debe45c532c83fd69" - integrity sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw== + version "5.30.3" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.30.3.tgz#f1bb68ded42408c316b548e3ec2526d7dd03f4d2" + integrity sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA== dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" commander "^2.20.0" source-map-support "~0.5.20" @@ -8958,7 +9414,7 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -8978,11 +9434,9 @@ tmp@^0.0.33: os-tmpdir "~1.0.2" tmp@^0.2.0, tmp@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== tmpl@1.0.5: version "1.0.5" @@ -9067,9 +9521,9 @@ ts-node@7.0.1: yn "^2.0.0" tsc-alias@^1.7.0: - version "1.8.6" - resolved "https://registry.yarnpkg.com/tsc-alias/-/tsc-alias-1.8.6.tgz#28300ed398e90b1c600548ed956f58dfbecc1589" - integrity sha512-vq+i6VpE83IeMsSJVcFN03ZBofADhr8/gIJXjxpbnTRfN/MFXy0+SBaKG2o7p95QqXBGkeG98HYz3IkOOveFbg== + version "1.8.8" + resolved "https://registry.yarnpkg.com/tsc-alias/-/tsc-alias-1.8.8.tgz#48696af442b7656dd7905e37ae0bc332d80be3fe" + integrity sha512-OYUOd2wl0H858NvABWr/BoSKNERw3N9GTi3rHPK8Iv4O1UyUXIrTTOAZNHsjlVpXFOhpJBVARI1s+rzwLivN3Q== dependencies: chokidar "^3.5.3" commander "^9.0.0" @@ -9078,10 +9532,10 @@ tsc-alias@^1.7.0: normalize-path "^3.0.0" plimit-lit "^1.2.6" -tsconfig-paths@^3.14.1, tsconfig-paths@^3.5.0, tsconfig-paths@^3.9.0: - version "3.14.2" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== +tsconfig-paths@^3.15.0, tsconfig-paths@^3.5.0, tsconfig-paths@^3.9.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.2" @@ -9093,10 +9547,10 @@ tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tsutils@^3.21.0: version "3.21.0" @@ -9106,9 +9560,9 @@ tsutils@^3.21.0: tslib "^1.8.1" tty-table@^4.1.5: - version "4.2.1" - resolved "https://registry.yarnpkg.com/tty-table/-/tty-table-4.2.1.tgz#c06cd76c54542acf4e2b4a0e9a5802984b65cba6" - integrity sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g== + version "4.2.3" + resolved "https://registry.yarnpkg.com/tty-table/-/tty-table-4.2.3.tgz#e33eb4007a0a9c976c97c37fa13ba66329a5c515" + integrity sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA== dependencies: chalk "^4.1.2" csv "^5.5.3" @@ -9118,47 +9572,47 @@ tty-table@^4.1.5: wcwidth "^1.0.1" yargs "^17.7.1" -turbo-darwin-64@1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.9.3.tgz#29470b902a1418dae8a88b2620caf917b27480bc" - integrity sha512-0dFc2cWXl82kRE4Z+QqPHhbEFEpUZho1msHXHWbz5+PqLxn8FY0lEVOHkq5tgKNNEd5KnGyj33gC/bHhpZOk5g== +turbo-darwin-64@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.13.2.tgz#34c8c8a06e9c38ed9cbd219b2ade6e83f02bc7b3" + integrity sha512-CCSuD8CfmtncpohCuIgq7eAzUas0IwSbHfI8/Q3vKObTdXyN8vAo01gwqXjDGpzG9bTEVedD0GmLbD23dR0MLA== -turbo-darwin-arm64@1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.3.tgz#0eb404d6101ba69eab8522b16260a4eb50885e6c" - integrity sha512-1cYbjqLBA2zYE1nbf/qVnEkrHa4PkJJbLo7hnuMuGM0bPzh4+AnTNe98gELhqI1mkTWBu/XAEeF5u6dgz0jLNA== +turbo-darwin-arm64@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.13.2.tgz#2fd380e13b8cd75d1514c433d196ea4be097230c" + integrity sha512-0HySm06/D2N91rJJ89FbiI/AodmY8B3WDSFTVEpu2+8spUw7hOJ8okWOT0e5iGlyayUP9gr31eOeL3VFZkpfCw== -turbo-linux-64@1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.9.3.tgz#dbce8fd50edee1319f17800ee38e7c4749ab0cb0" - integrity sha512-UuBPFefawEwpuxh5pM9Jqq3q4C8M0vYxVYlB3qea/nHQ80pxYq7ZcaLGEpb10SGnr3oMUUs1zZvkXWDNKCJb8Q== +turbo-linux-64@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.13.2.tgz#a861fb4180e0a601459b79837b4e2ded27c7ffa7" + integrity sha512-7HnibgbqZrjn4lcfIouzlPu8ZHSBtURG4c7Bedu7WJUDeZo+RE1crlrQm8wuwO54S0siYqUqo7GNHxu4IXbioQ== -turbo-linux-arm64@1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.9.3.tgz#636b77fde17c7a5cdef8a20616ff57f08c785345" - integrity sha512-vUrNGa3hyDtRh9W0MkO+l1dzP8Co2gKnOVmlJQW0hdpOlWlIh22nHNGGlICg+xFa2f9j4PbQlWTsc22c019s8Q== +turbo-linux-arm64@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.13.2.tgz#e0d290ea338eb8e5fb8905547954d36f81d8d7fa" + integrity sha512-sUq4dbpk6SNKg/Hkwn256Vj2AEYSQdG96repio894h5/LEfauIK2QYiC/xxAeW3WBMc6BngmvNyURIg7ltrePg== -turbo-windows-64@1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.9.3.tgz#c65625c222456161b0b4d000ec7f50e372332825" - integrity sha512-0BZ7YaHs6r+K4ksqWus1GKK3W45DuDqlmfjm/yuUbTEVc8szmMCs12vugU2Zi5GdrdJSYfoKfEJ/PeegSLIQGQ== +turbo-windows-64@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.13.2.tgz#c9821ea0d34204d3bed28ccfb096c520dbe3c209" + integrity sha512-DqzhcrciWq3dpzllJR2VVIyOhSlXYCo4mNEWl98DJ3FZ08PEzcI3ceudlH6F0t/nIcfSItK1bDP39cs7YoZHEA== -turbo-windows-arm64@1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.9.3.tgz#86e105692ad6ba935eff0284522bdf7728a2e517" - integrity sha512-QJUYLSsxdXOsR1TquiOmLdAgtYcQ/RuSRpScGvnZb1hY0oLc7JWU0llkYB81wVtWs469y8H9O0cxbKwCZGR4RQ== +turbo-windows-arm64@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.13.2.tgz#07d6a01a1bfc6293ee8365cf3639914244f6f0b9" + integrity sha512-WnPMrwfCXxK69CdDfS1/j2DlzcKxSmycgDAqV0XCYpK/812KB0KlvsVAt5PjEbZGXkY88pCJ1BLZHAjF5FcbqA== turbo@^1.7.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.9.3.tgz#911012624f647f98d9788a08e25b98e38cdd48b2" - integrity sha512-ID7mxmaLUPKG/hVkp+h0VuucB1U99RPCJD9cEuSEOdIPoSIuomcIClEJtKamUsdPLhLCud+BvapBNnhgh58Nzw== + version "1.13.2" + resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.13.2.tgz#c45919cb1cebc86390516184396247eedf65e232" + integrity sha512-rX/d9f4MgRT3yK6cERPAkfavIxbpBZowDQpgvkYwGMGDQ0Nvw1nc0NVjruE76GrzXQqoxR1UpnmEP54vBARFHQ== optionalDependencies: - turbo-darwin-64 "1.9.3" - turbo-darwin-arm64 "1.9.3" - turbo-linux-64 "1.9.3" - turbo-linux-arm64 "1.9.3" - turbo-windows-64 "1.9.3" - turbo-windows-arm64 "1.9.3" + turbo-darwin-64 "1.13.2" + turbo-darwin-arm64 "1.13.2" + turbo-linux-64 "1.13.2" + turbo-linux-arm64 "1.13.2" + turbo-windows-64 "1.13.2" + turbo-windows-arm64 "1.13.2" tweetnacl@1.0.3, tweetnacl@^1.0.1, tweetnacl@^1.0.2, tweetnacl@^1.0.3: version "1.0.3" @@ -9202,14 +9656,54 @@ type-fest@^0.8.0, type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== +type-fest@^1.0.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== + +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + dependencies: + call-bind "^1.0.7" for-each "^0.3.3" - is-typed-array "^1.1.9" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" typedarray-to-buffer@^3.1.5: version "3.1.5" @@ -9228,6 +9722,11 @@ typedoc@^0.23.0: minimatch "^7.1.3" shiki "^0.14.1" +typescript@4.7: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== + typescript@^4.5.4: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" @@ -9248,6 +9747,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -9284,14 +9788,14 @@ universalify@^0.1.0: integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -update-browserslist-db@^1.0.10: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -9320,15 +9824,26 @@ util-deprecate@^1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + 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" + uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== v8-compile-cache@2.3.0: version "2.3.0" @@ -9336,13 +9851,13 @@ v8-compile-cache@2.3.0: integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== v8-to-istanbul@^9.0.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265" - integrity sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA== + version "9.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" + integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" + convert-source-map "^2.0.0" validate-npm-package-license@^3.0.1: version "3.0.4" @@ -9369,14 +9884,14 @@ vscode-json-languageservice@^4.1.6: vscode-uri "^3.0.3" vscode-languageserver-textdocument@^1.0.3: - version "1.0.8" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0" - integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q== + version "1.0.11" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz#0822a000e7d4dc083312580d7575fe9e3ba2e2bf" + integrity sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA== vscode-languageserver-types@^3.16.0: - version "3.17.3" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz#72d05e47b73be93acb84d6e311b5786390f13f64" - integrity sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA== + version "3.17.5" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a" + integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg== vscode-nls@^5.0.0: version "5.2.0" @@ -9394,9 +9909,9 @@ vscode-textmate@^8.0.0: integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== vscode-uri@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.7.tgz#6d19fef387ee6b46c479e5fb00870e15e58c1eb8" - integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA== + version "3.0.8" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.8.tgz#1770938d3e72588659a172d0fd4642780083ff9f" + integrity sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw== wait-on@7.0.1: version "7.0.1" @@ -9424,13 +9939,14 @@ wcwidth@^1.0.1: defaults "^1.0.3" web3-utils@^1.3.4: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.9.0.tgz#7c5775a47586cefb4ad488831be8f6627be9283d" - integrity sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ== + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.4.tgz#0daee7d6841641655d8b3726baf33b08eda1cbec" + integrity sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A== dependencies: + "@ethereumjs/util" "^8.1.0" bn.js "^5.2.1" ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" + ethereum-cryptography "^2.1.2" ethjs-unit "0.1.6" number-to-bn "1.7.0" randombytes "^2.1.0" @@ -9473,19 +9989,18 @@ which-pm@2.0.0: load-yaml-file "^0.2.0" path-exists "^4.0.0" -which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== +which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" + has-tostringtag "^1.0.2" -which@^1.2.9: +which@^1.2.14, which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -9499,17 +10014,12 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -word-wrap@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f" - integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA== - workerpool@6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -wrap-ansi@^6.2.0: +wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== @@ -9527,6 +10037,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -9560,10 +10079,10 @@ ws@^7.4.5: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -ws@^8.5.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== +ws@^8.5.0, ws@^8.9.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" + integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== y18n@^4.0.0: version "4.0.3" @@ -9590,16 +10109,16 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" + integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== + yaml@^1.10.0: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yaml@^2.2.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" - integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== - yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -9638,7 +10157,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0, yargs@^16.1.0: +yargs@16.2.0, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==