diff --git a/frontend/.env.sample b/frontend/.env.sample index d6c6bf3e..3ce04aef 100644 --- a/frontend/.env.sample +++ b/frontend/.env.sample @@ -1,2 +1,3 @@ ENDPOINT="https://api.devnet.solana.com" +BACKEND_ENDPOINT="https://api.devnet.solana.com" CLUSTER="devnet" diff --git a/frontend/package.json b/frontend/package.json index 20f6756a..58464182 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,15 +8,16 @@ "start": "next start" }, "dependencies": { + "@coral-xyz/anchor": "^0.29.0", + "@coral-xyz/spl-token": "^0.29.0", "@headlessui/react": "^1.6.0", "@heroicons/react": "^1.0.6", - "@coral-xyz/anchor": "^0.29.0", "@pythnetwork/staking": "*", "@solana/spl-token": "^0.1.8", "@solana/wallet-adapter-base": "^0.9.22", "@solana/wallet-adapter-react": "^0.15.32", "@solana/wallet-adapter-react-ui": "^0.9.31", - "@solana/wallet-adapter-wallets": "=0.19.16", + "@solana/wallet-adapter-wallets": "^0.19.16", "@solana/web3.js": "^1.87.5", "@tippyjs/react": "^4.2.6", "dotenv": "^16.0.0", diff --git a/frontend/pages/api/v1/locked_accounts.ts b/frontend/pages/api/v1/locked_accounts.ts new file mode 100644 index 00000000..fb7bfca9 --- /dev/null +++ b/frontend/pages/api/v1/locked_accounts.ts @@ -0,0 +1,159 @@ +import { NextApiRequest, NextApiResponse } from 'next' +import { PythBalance } from '@pythnetwork/staking/app/pythBalance' +import BN from 'bn.js' +import { STAKING_ADDRESS } from '@pythnetwork/staking/app/constants' +import { Connection, Keypair, PublicKey } from '@solana/web3.js' +import { bs58 } from '@coral-xyz/anchor/dist/cjs/utils/bytes' +import { Program, AnchorProvider } from '@coral-xyz/anchor' +import NodeWallet from '@coral-xyz/anchor/dist/cjs/nodewallet' +import { Staking } from '@pythnetwork/staking/lib/target/types/staking' +import idl from '@pythnetwork/staking/target/idl/staking.json' +import { splTokenProgram } from '@coral-xyz/spl-token' +import { TOKEN_PROGRAM_ID } from '@solana/spl-token' + +const connection = new Connection(process.env.BACKEND_ENDPOINT!) +const provider = new AnchorProvider( + connection, + new NodeWallet(new Keypair()), + {} +) +const stakingProgram = new Program( + idl as Staking, + STAKING_ADDRESS, + provider +) +const tokenProgram = splTokenProgram({ + programId: TOKEN_PROGRAM_ID, + provider: provider as any, +}) + +export default async function handlerLockedAccounts( + req: NextApiRequest, + res: NextApiResponse +) { + const { owner } = req.query + + if (owner == undefined || owner instanceof Array) { + res.status(400).json({ + error: "Must provide the 'owner' query parameters", + }) + } else { + const stakeAccounts = await geStakeAccounts( + connection, + new PublicKey(owner) + ) + res.status(200).json( + await Promise.all( + stakeAccounts.map((account) => { + return getStakeAccountDetails(account) + }) + ) + ) + } +} + +async function getStakeAccountDetails(positionAccountAddress: PublicKey) { + const configAccountAddress = PublicKey.findProgramAddressSync( + [Buffer.from('config')], + STAKING_ADDRESS + )[0] + const configAccountData = await stakingProgram.account.globalConfig.fetch( + configAccountAddress + ) + + const metadataAccountAddress = PublicKey.findProgramAddressSync( + [Buffer.from('stake_metadata'), positionAccountAddress.toBuffer()], + STAKING_ADDRESS + )[0] + const metadataAccountData = + await stakingProgram.account.stakeAccountMetadataV2.fetch( + metadataAccountAddress + ) + + const lock = metadataAccountData.lock + + const custodyAccountAddress = PublicKey.findProgramAddressSync( + [Buffer.from('custody'), positionAccountAddress.toBuffer()], + STAKING_ADDRESS + )[0] + + const custodyAccountData = await tokenProgram.account.account.fetch( + custodyAccountAddress + ) + + return { + custodyAccount: custodyAccountAddress.toBase58(), + actualAmount: new PythBalance(custodyAccountData.amount).toString(), + lock: getLockSummary(lock, configAccountData.pythTokenListTime), + } +} + +async function geStakeAccounts(connection: Connection, owner: PublicKey) { + const response = await connection.getProgramAccounts(STAKING_ADDRESS, { + encoding: 'base64', + filters: [ + { + memcmp: { + offset: 0, + bytes: bs58.encode(Buffer.from('55c3f14f7cc04f0b', 'hex')), // Positions account discriminator + }, + }, + { + memcmp: { + offset: 8, + bytes: owner.toBase58(), + }, + }, + ], + }) + return response.map((account) => { + return account.pubkey + }) +} + +export function getLockSummary(lock: any, listTime: BN | null) { + if (lock.fullyVested) { + return { type: 'fullyUnlocked' } + } else if (lock.periodicVestingAfterListing) { + return { + type: 'periodicUnlockingAfterListing', + schedule: getUnlockEvents( + listTime, + lock.periodicVestingAfterListing.periodDuration, + lock.periodicVestingAfterListing.numPeriods, + lock.periodicVestingAfterListing.initialBalance + ), + } + } else if (lock.periodicVesting) { + return { + type: 'periodicUnlocking', + schedule: getUnlockEvents( + lock.periodicVesting.startDate, + lock.periodicVesting.periodDuration, + lock.periodicVesting.numPeriods, + lock.periodicVesting.initialBalance + ), + } + } +} + +export function getUnlockEvents( + startData: BN | null, + periodDuration: BN, + numberOfPeriods: BN, + initialBalance: BN +) { + if (startData) { + return Array(numberOfPeriods.toNumber()) + .fill(0) + .map((_, i) => { + return { + date: startData.add(periodDuration.muln(i + 1)).toString(), + amount: new PythBalance( + initialBalance.divn(numberOfPeriods.toNumber()) + ).toString(), + } + }) + } + return [] +} diff --git a/package-lock.json b/package-lock.json index e967d204..1eacca85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "name": "pyth-staking-frontend", "dependencies": { "@coral-xyz/anchor": "^0.29.0", + "@coral-xyz/spl-token": "^0.29.0", "@headlessui/react": "^1.6.0", "@heroicons/react": "^1.0.6", "@pythnetwork/staking": "*", @@ -26,7 +27,7 @@ "@solana/wallet-adapter-base": "^0.9.22", "@solana/wallet-adapter-react": "^0.15.32", "@solana/wallet-adapter-react-ui": "^0.9.31", - "@solana/wallet-adapter-wallets": "=0.19.16", + "@solana/wallet-adapter-wallets": "^0.19.16", "@solana/web3.js": "^1.87.5", "@tippyjs/react": "^4.2.6", "dotenv": "^16.0.0", @@ -51,64 +52,6 @@ "typescript": "5.1.3" } }, - "frontend/node_modules/@solana/wallet-adapter-wallets": { - "version": "0.19.16", - "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-wallets/-/wallet-adapter-wallets-0.19.16.tgz", - "integrity": "sha512-Q+6Tv+oIkD+fhsUuPp+jLb+dyoB3hrX7XT+Xr5vMZvxQuB5bcUn7m0ZWGoAh0dw1FsfsOXMTGu1aNwS3XSqxtw==", - "dependencies": { - "@solana/wallet-adapter-alpha": "^0.1.9", - "@solana/wallet-adapter-avana": "^0.1.12", - "@solana/wallet-adapter-backpack": "^0.1.13", - "@solana/wallet-adapter-bitkeep": "^0.3.18", - "@solana/wallet-adapter-bitpie": "^0.5.17", - "@solana/wallet-adapter-blocto": "^0.5.21", - "@solana/wallet-adapter-brave": "^0.1.16", - "@solana/wallet-adapter-censo": "^0.1.3", - "@solana/wallet-adapter-clover": "^0.4.18", - "@solana/wallet-adapter-coin98": "^0.5.19", - "@solana/wallet-adapter-coinbase": "^0.1.17", - "@solana/wallet-adapter-coinhub": "^0.3.17", - "@solana/wallet-adapter-exodus": "^0.1.17", - "@solana/wallet-adapter-fractal": "^0.1.7", - "@solana/wallet-adapter-glow": "^0.1.17", - "@solana/wallet-adapter-huobi": "^0.1.14", - "@solana/wallet-adapter-hyperpay": "^0.1.13", - "@solana/wallet-adapter-keystone": "^0.1.11", - "@solana/wallet-adapter-krystal": "^0.1.11", - "@solana/wallet-adapter-ledger": "^0.9.24", - "@solana/wallet-adapter-magiceden": "^0.1.12", - "@solana/wallet-adapter-mathwallet": "^0.9.17", - "@solana/wallet-adapter-neko": "^0.2.11", - "@solana/wallet-adapter-nightly": "^0.1.15", - "@solana/wallet-adapter-nufi": "^0.1.16", - "@solana/wallet-adapter-onto": "^0.1.6", - "@solana/wallet-adapter-particle": "^0.1.9", - "@solana/wallet-adapter-phantom": "^0.9.22", - "@solana/wallet-adapter-safepal": "^0.5.17", - "@solana/wallet-adapter-saifu": "^0.1.14", - "@solana/wallet-adapter-salmon": "^0.1.13", - "@solana/wallet-adapter-sky": "^0.1.14", - "@solana/wallet-adapter-slope": "^0.5.20", - "@solana/wallet-adapter-solflare": "^0.6.24", - "@solana/wallet-adapter-sollet": "^0.11.16", - "@solana/wallet-adapter-solong": "^0.9.17", - "@solana/wallet-adapter-spot": "^0.1.14", - "@solana/wallet-adapter-strike": "^0.1.12", - "@solana/wallet-adapter-tokenary": "^0.1.11", - "@solana/wallet-adapter-tokenpocket": "^0.4.18", - "@solana/wallet-adapter-torus": "^0.11.27", - "@solana/wallet-adapter-trust": "^0.1.12", - "@solana/wallet-adapter-unsafe-burner": "^0.1.6", - "@solana/wallet-adapter-walletconnect": "^0.1.14", - "@solana/wallet-adapter-xdefi": "^0.1.6" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "@solana/web3.js": "^1.58.0" - } - }, "frontend/node_modules/typescript": { "version": "5.1.3", "dev": true, @@ -2533,6 +2476,15 @@ "@solana/web3.js": "^1.68.0" } }, + "node_modules/@coral-xyz/spl-token": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/spl-token/-/spl-token-0.29.0.tgz", + "integrity": "sha512-NgkbBGI87pUPmf0FNuPoizwQImKLVt1hc28ylxTvszbRg19azqeLs1hBK7WGHV2RXDN+RqH8dASb+7Gj1aXJMw==", + "dependencies": { + "@coral-xyz/anchor": "=0.29.0", + "@native-to-anchor/buffer-layout": "=0.1.0" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -3044,27 +2996,6 @@ "ws": "7.4.6" } }, - "node_modules/@ethersproject/providers/node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@ethersproject/random": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", @@ -4499,6 +4430,15 @@ "ieee754": "^1.2.1" } }, + "node_modules/@native-to-anchor/buffer-layout": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@native-to-anchor/buffer-layout/-/buffer-layout-0.1.0.tgz", + "integrity": "sha512-7Ykz9KRAm53XqHj5blDUKPX+OXAPO4GZBW4zJhfHGIAbzmqsUFh9kMqR66Bak3mp6wyv1OVTwSr8ZGHKswPxDg==", + "dependencies": { + "@solana/buffer-layout": "=4.0.0", + "@solana/buffer-layout-utils": "=0.2.0" + } + }, "node_modules/@next/env": { "version": "12.2.5", "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.5.tgz", @@ -5598,6 +5538,11 @@ "uuid": "^8.3.2" } }, + "node_modules/@particle-network/auth/node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + }, "node_modules/@particle-network/auth/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -6122,6 +6067,27 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "peer": true }, + "node_modules/@react-native-community/cli-server-api/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@react-native-community/cli-tools": { "version": "11.3.10", "resolved": "https://registry.npmjs.org/@react-native-community/cli-tools/-/cli-tools-11.3.10.tgz", @@ -6794,9 +6760,9 @@ } }, "node_modules/@solana/buffer-layout": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", - "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz", + "integrity": "sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ==", "dependencies": { "buffer": "~6.0.3" }, @@ -6808,7 +6774,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", - "dev": true, "dependencies": { "@solana/buffer-layout": "^4.0.0", "@solana/web3.js": "^1.32.0", @@ -7668,6 +7633,64 @@ "@solana/web3.js": "^1.77.3" } }, + "node_modules/@solana/wallet-adapter-wallets": { + "version": "0.19.16", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-wallets/-/wallet-adapter-wallets-0.19.16.tgz", + "integrity": "sha512-Q+6Tv+oIkD+fhsUuPp+jLb+dyoB3hrX7XT+Xr5vMZvxQuB5bcUn7m0ZWGoAh0dw1FsfsOXMTGu1aNwS3XSqxtw==", + "dependencies": { + "@solana/wallet-adapter-alpha": "^0.1.9", + "@solana/wallet-adapter-avana": "^0.1.12", + "@solana/wallet-adapter-backpack": "^0.1.13", + "@solana/wallet-adapter-bitkeep": "^0.3.18", + "@solana/wallet-adapter-bitpie": "^0.5.17", + "@solana/wallet-adapter-blocto": "^0.5.21", + "@solana/wallet-adapter-brave": "^0.1.16", + "@solana/wallet-adapter-censo": "^0.1.3", + "@solana/wallet-adapter-clover": "^0.4.18", + "@solana/wallet-adapter-coin98": "^0.5.19", + "@solana/wallet-adapter-coinbase": "^0.1.17", + "@solana/wallet-adapter-coinhub": "^0.3.17", + "@solana/wallet-adapter-exodus": "^0.1.17", + "@solana/wallet-adapter-fractal": "^0.1.7", + "@solana/wallet-adapter-glow": "^0.1.17", + "@solana/wallet-adapter-huobi": "^0.1.14", + "@solana/wallet-adapter-hyperpay": "^0.1.13", + "@solana/wallet-adapter-keystone": "^0.1.11", + "@solana/wallet-adapter-krystal": "^0.1.11", + "@solana/wallet-adapter-ledger": "^0.9.24", + "@solana/wallet-adapter-magiceden": "^0.1.12", + "@solana/wallet-adapter-mathwallet": "^0.9.17", + "@solana/wallet-adapter-neko": "^0.2.11", + "@solana/wallet-adapter-nightly": "^0.1.15", + "@solana/wallet-adapter-nufi": "^0.1.16", + "@solana/wallet-adapter-onto": "^0.1.6", + "@solana/wallet-adapter-particle": "^0.1.9", + "@solana/wallet-adapter-phantom": "^0.9.22", + "@solana/wallet-adapter-safepal": "^0.5.17", + "@solana/wallet-adapter-saifu": "^0.1.14", + "@solana/wallet-adapter-salmon": "^0.1.13", + "@solana/wallet-adapter-sky": "^0.1.14", + "@solana/wallet-adapter-slope": "^0.5.20", + "@solana/wallet-adapter-solflare": "^0.6.24", + "@solana/wallet-adapter-sollet": "^0.11.16", + "@solana/wallet-adapter-solong": "^0.9.17", + "@solana/wallet-adapter-spot": "^0.1.14", + "@solana/wallet-adapter-strike": "^0.1.12", + "@solana/wallet-adapter-tokenary": "^0.1.11", + "@solana/wallet-adapter-tokenpocket": "^0.4.18", + "@solana/wallet-adapter-torus": "^0.11.27", + "@solana/wallet-adapter-trust": "^0.1.12", + "@solana/wallet-adapter-unsafe-burner": "^0.1.6", + "@solana/wallet-adapter-walletconnect": "^0.1.14", + "@solana/wallet-adapter-xdefi": "^0.1.6" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "@solana/web3.js": "^1.58.0" + } + }, "node_modules/@solana/wallet-adapter-xdefi": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-xdefi/-/wallet-adapter-xdefi-0.1.7.tgz", @@ -8219,6 +8242,19 @@ "unload": "^2.4.1" } }, + "node_modules/@toruslabs/broadcast-channel/node_modules/oblivious-set": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.1.1.tgz", + "integrity": "sha512-Oh+8fK09mgGmAshFdH6hSVco6KZmd1tTwNFWj35OvzdmJTMZtAkbn05zar2iG3v6sDs1JLEtOiBGNb6BHwkb2w==" + }, + "node_modules/@toruslabs/broadcast-channel/node_modules/unload": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/unload/-/unload-2.4.1.tgz", + "integrity": "sha512-IViSAm8Z3sRBYA+9wc0fLQmU9Nrxb16rcDmIiR6Y9LJSZzI7QY5QsDhqPpKOjAn0O9/kfK1TfNEMMAGPTIraPw==", + "funding": { + "url": "https://github.com/sponsors/pubkey" + } + }, "node_modules/@toruslabs/eccrypto": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-2.2.1.tgz", @@ -8796,6 +8832,26 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/@walletconnect/jsonrpc-ws-connection/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@walletconnect/keyvaluestorage": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", @@ -10109,11 +10165,6 @@ "unload": "2.2.0" } }, - "node_modules/broadcast-channel/node_modules/oblivious-set": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.0.0.tgz", - "integrity": "sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw==" - }, "node_modules/broadcast-channel/node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -10128,15 +10179,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/broadcast-channel/node_modules/unload": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz", - "integrity": "sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA==", - "dependencies": { - "@babel/runtime": "^7.6.2", - "detect-node": "^2.0.4" - } - }, "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", @@ -11536,9 +11578,10 @@ } }, "node_modules/crypto-js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", + "dev": true }, "node_modules/cssesc": { "version": "3.0.0", @@ -12048,9 +12091,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.590", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.590.tgz", - "integrity": "sha512-hohItzsQcG7/FBsviCYMtQwUSWvVF7NVqPOnJCErWsAshsP/CR2LAXdmq276RbESNdhxiAq5/vRo1g2pxGXVww==" + "version": "1.4.591", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.591.tgz", + "integrity": "sha512-vLv/P7wwAPKQoY+CVMyyI6rsTp+A14KGtPXx92oz1FY41AAqa9l6Wkizcixg0LDuJgyeo8xgNN9+9hsnGp66UA==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -15646,12 +15689,6 @@ "node": ">= 7.6.0" } }, - "node_modules/merkletreejs/node_modules/crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", - "dev": true - }, "node_modules/metro": { "version": "0.76.8", "resolved": "https://registry.npmjs.org/metro/-/metro-0.76.8.tgz", @@ -15985,6 +16022,27 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "peer": true }, + "node_modules/metro-inspector-proxy/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/metro-inspector-proxy/node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -16283,6 +16341,27 @@ "node": ">=0.10.0" } }, + "node_modules/metro/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/metro/node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -18047,9 +18126,9 @@ } }, "node_modules/oblivious-set": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.1.1.tgz", - "integrity": "sha512-Oh+8fK09mgGmAshFdH6hSVco6KZmd1tTwNFWj35OvzdmJTMZtAkbn05zar2iG3v6sDs1JLEtOiBGNb6BHwkb2w==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.0.0.tgz", + "integrity": "sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw==" }, "node_modules/ofetch": { "version": "1.3.3", @@ -23100,11 +23179,12 @@ } }, "node_modules/unload": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/unload/-/unload-2.4.1.tgz", - "integrity": "sha512-IViSAm8Z3sRBYA+9wc0fLQmU9Nrxb16rcDmIiR6Y9LJSZzI7QY5QsDhqPpKOjAn0O9/kfK1TfNEMMAGPTIraPw==", - "funding": { - "url": "https://github.com/sponsors/pubkey" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz", + "integrity": "sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA==", + "dependencies": { + "@babel/runtime": "^7.6.2", + "detect-node": "^2.0.4" } }, "node_modules/unpipe": { @@ -23713,9 +23793,9 @@ } }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "engines": { "node": ">=8.3.0" }, @@ -23942,13 +24022,11 @@ }, "staking/node_modules/arg": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "license": "MIT" }, "staking/node_modules/borsh": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.3.1.tgz", - "integrity": "sha512-gJoSTnhwLxN/i2+15Y7uprU8h3CKI+Co4YKZKvrGYUy0FwHWM20x5Sx7eU8Xv4HQqV+7rb4r3P7K1cBIQe3q8A==", + "license": "Apache-2.0", "dependencies": { "@types/bn.js": "^4.11.5", "bn.js": "^5.0.0", @@ -23958,24 +24036,21 @@ }, "staking/node_modules/borsh/node_modules/@types/bn.js": { "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "license": "MIT", "dependencies": { "@types/node": "*" } }, "staking/node_modules/diff": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "staking/node_modules/ts-node": { "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -24027,8 +24102,7 @@ }, "staking/node_modules/yn": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "license": "MIT", "engines": { "node": ">=6" } @@ -25723,6 +25797,15 @@ "buffer-layout": "^1.2.0" } }, + "@coral-xyz/spl-token": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/spl-token/-/spl-token-0.29.0.tgz", + "integrity": "sha512-NgkbBGI87pUPmf0FNuPoizwQImKLVt1hc28ylxTvszbRg19azqeLs1hBK7WGHV2RXDN+RqH8dASb+7Gj1aXJMw==", + "requires": { + "@coral-xyz/anchor": "=0.29.0", + "@native-to-anchor/buffer-layout": "=0.1.0" + } + }, "@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -26029,15 +26112,6 @@ "@ethersproject/web": "^5.7.0", "bech32": "1.1.4", "ws": "7.4.6" - }, - "dependencies": { - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "requires": {} - } } }, "@ethersproject/random": { @@ -27191,6 +27265,15 @@ } } }, + "@native-to-anchor/buffer-layout": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@native-to-anchor/buffer-layout/-/buffer-layout-0.1.0.tgz", + "integrity": "sha512-7Ykz9KRAm53XqHj5blDUKPX+OXAPO4GZBW4zJhfHGIAbzmqsUFh9kMqR66Bak3mp6wyv1OVTwSr8ZGHKswPxDg==", + "requires": { + "@solana/buffer-layout": "=4.0.0", + "@solana/buffer-layout-utils": "=0.2.0" + } + }, "@next/env": { "version": "12.2.5", "resolved": "https://registry.npmjs.org/@next/env/-/env-12.2.5.tgz", @@ -27809,6 +27892,11 @@ "uuid": "^8.3.2" }, "dependencies": { + "crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -27893,14 +27981,10 @@ "version": "17.0.45" }, "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "version": "4.1.3" }, "borsh": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.3.1.tgz", - "integrity": "sha512-gJoSTnhwLxN/i2+15Y7uprU8h3CKI+Co4YKZKvrGYUy0FwHWM20x5Sx7eU8Xv4HQqV+7rb4r3P7K1cBIQe3q8A==", "requires": { "@types/bn.js": "^4.11.5", "bn.js": "^5.0.0", @@ -27910,8 +27994,6 @@ "dependencies": { "@types/bn.js": { "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "requires": { "@types/node": "*" } @@ -27919,14 +28001,10 @@ } }, "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + "version": "4.0.2" }, "ts-node": { "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "requires": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -27947,9 +28025,7 @@ "version": "4.9.5" }, "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + "version": "3.1.1" } } }, @@ -28392,6 +28468,13 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "peer": true + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "requires": {} } } }, @@ -28881,9 +28964,9 @@ } }, "@solana/buffer-layout": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", - "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz", + "integrity": "sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ==", "requires": { "buffer": "~6.0.3" }, @@ -28903,7 +28986,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz", "integrity": "sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==", - "dev": true, "requires": { "@solana/buffer-layout": "^4.0.0", "@solana/web3.js": "^1.32.0", @@ -29403,6 +29485,58 @@ "@solana/wallet-adapter-base": "^0.9.23" } }, + "@solana/wallet-adapter-wallets": { + "version": "0.19.16", + "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-wallets/-/wallet-adapter-wallets-0.19.16.tgz", + "integrity": "sha512-Q+6Tv+oIkD+fhsUuPp+jLb+dyoB3hrX7XT+Xr5vMZvxQuB5bcUn7m0ZWGoAh0dw1FsfsOXMTGu1aNwS3XSqxtw==", + "requires": { + "@solana/wallet-adapter-alpha": "^0.1.9", + "@solana/wallet-adapter-avana": "^0.1.12", + "@solana/wallet-adapter-backpack": "^0.1.13", + "@solana/wallet-adapter-bitkeep": "^0.3.18", + "@solana/wallet-adapter-bitpie": "^0.5.17", + "@solana/wallet-adapter-blocto": "^0.5.21", + "@solana/wallet-adapter-brave": "^0.1.16", + "@solana/wallet-adapter-censo": "^0.1.3", + "@solana/wallet-adapter-clover": "^0.4.18", + "@solana/wallet-adapter-coin98": "^0.5.19", + "@solana/wallet-adapter-coinbase": "^0.1.17", + "@solana/wallet-adapter-coinhub": "^0.3.17", + "@solana/wallet-adapter-exodus": "^0.1.17", + "@solana/wallet-adapter-fractal": "^0.1.7", + "@solana/wallet-adapter-glow": "^0.1.17", + "@solana/wallet-adapter-huobi": "^0.1.14", + "@solana/wallet-adapter-hyperpay": "^0.1.13", + "@solana/wallet-adapter-keystone": "^0.1.11", + "@solana/wallet-adapter-krystal": "^0.1.11", + "@solana/wallet-adapter-ledger": "^0.9.24", + "@solana/wallet-adapter-magiceden": "^0.1.12", + "@solana/wallet-adapter-mathwallet": "^0.9.17", + "@solana/wallet-adapter-neko": "^0.2.11", + "@solana/wallet-adapter-nightly": "^0.1.15", + "@solana/wallet-adapter-nufi": "^0.1.16", + "@solana/wallet-adapter-onto": "^0.1.6", + "@solana/wallet-adapter-particle": "^0.1.9", + "@solana/wallet-adapter-phantom": "^0.9.22", + "@solana/wallet-adapter-safepal": "^0.5.17", + "@solana/wallet-adapter-saifu": "^0.1.14", + "@solana/wallet-adapter-salmon": "^0.1.13", + "@solana/wallet-adapter-sky": "^0.1.14", + "@solana/wallet-adapter-slope": "^0.5.20", + "@solana/wallet-adapter-solflare": "^0.6.24", + "@solana/wallet-adapter-sollet": "^0.11.16", + "@solana/wallet-adapter-solong": "^0.9.17", + "@solana/wallet-adapter-spot": "^0.1.14", + "@solana/wallet-adapter-strike": "^0.1.12", + "@solana/wallet-adapter-tokenary": "^0.1.11", + "@solana/wallet-adapter-tokenpocket": "^0.4.18", + "@solana/wallet-adapter-torus": "^0.11.27", + "@solana/wallet-adapter-trust": "^0.1.12", + "@solana/wallet-adapter-unsafe-burner": "^0.1.6", + "@solana/wallet-adapter-walletconnect": "^0.1.14", + "@solana/wallet-adapter-xdefi": "^0.1.6" + } + }, "@solana/wallet-adapter-xdefi": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-xdefi/-/wallet-adapter-xdefi-0.1.7.tgz", @@ -29852,6 +29986,18 @@ "oblivious-set": "1.1.1", "socket.io-client": "^4.6.1", "unload": "^2.4.1" + }, + "dependencies": { + "oblivious-set": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.1.1.tgz", + "integrity": "sha512-Oh+8fK09mgGmAshFdH6hSVco6KZmd1tTwNFWj35OvzdmJTMZtAkbn05zar2iG3v6sDs1JLEtOiBGNb6BHwkb2w==" + }, + "unload": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/unload/-/unload-2.4.1.tgz", + "integrity": "sha512-IViSAm8Z3sRBYA+9wc0fLQmU9Nrxb16rcDmIiR6Y9LJSZzI7QY5QsDhqPpKOjAn0O9/kfK1TfNEMMAGPTIraPw==" + } } }, "@toruslabs/eccrypto": { @@ -30383,6 +30529,12 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} } } }, @@ -31475,11 +31627,6 @@ "unload": "2.2.0" }, "dependencies": { - "oblivious-set": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.0.0.tgz", - "integrity": "sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw==" - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -31487,15 +31634,6 @@ "requires": { "glob": "^7.1.3" } - }, - "unload": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz", - "integrity": "sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA==", - "requires": { - "@babel/runtime": "^7.6.2", - "detect-node": "^2.0.4" - } } } }, @@ -32570,9 +32708,10 @@ "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==" }, "crypto-js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", + "dev": true }, "cssesc": { "version": "3.0.0", @@ -32965,9 +33104,9 @@ } }, "electron-to-chromium": { - "version": "1.4.590", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.590.tgz", - "integrity": "sha512-hohItzsQcG7/FBsviCYMtQwUSWvVF7NVqPOnJCErWsAshsP/CR2LAXdmq276RbESNdhxiAq5/vRo1g2pxGXVww==" + "version": "1.4.591", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.591.tgz", + "integrity": "sha512-vLv/P7wwAPKQoY+CVMyyI6rsTp+A14KGtPXx92oz1FY41AAqa9l6Wkizcixg0LDuJgyeo8xgNN9+9hsnGp66UA==" }, "elliptic": { "version": "6.5.4", @@ -35756,14 +35895,6 @@ "crypto-js": "^3.1.9-1", "treeify": "^1.1.0", "web3-utils": "^1.3.4" - }, - "dependencies": { - "crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", - "dev": true - } } }, "metro": { @@ -35858,6 +35989,13 @@ "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "peer": true }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "requires": {} + }, "yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -36105,6 +36243,13 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "peer": true }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "peer": true, + "requires": {} + }, "yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -37612,9 +37757,9 @@ } }, "oblivious-set": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.1.1.tgz", - "integrity": "sha512-Oh+8fK09mgGmAshFdH6hSVco6KZmd1tTwNFWj35OvzdmJTMZtAkbn05zar2iG3v6sDs1JLEtOiBGNb6BHwkb2w==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/oblivious-set/-/oblivious-set-1.0.0.tgz", + "integrity": "sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw==" }, "ofetch": { "version": "1.3.3", @@ -38455,6 +38600,7 @@ "version": "file:frontend", "requires": { "@coral-xyz/anchor": "^0.29.0", + "@coral-xyz/spl-token": "^0.29.0", "@headlessui/react": "^1.6.0", "@heroicons/react": "^1.0.6", "@pythnetwork/staking": "*", @@ -38485,58 +38631,6 @@ "typescript": "5.1.3" }, "dependencies": { - "@solana/wallet-adapter-wallets": { - "version": "0.19.16", - "resolved": "https://registry.npmjs.org/@solana/wallet-adapter-wallets/-/wallet-adapter-wallets-0.19.16.tgz", - "integrity": "sha512-Q+6Tv+oIkD+fhsUuPp+jLb+dyoB3hrX7XT+Xr5vMZvxQuB5bcUn7m0ZWGoAh0dw1FsfsOXMTGu1aNwS3XSqxtw==", - "requires": { - "@solana/wallet-adapter-alpha": "^0.1.9", - "@solana/wallet-adapter-avana": "^0.1.12", - "@solana/wallet-adapter-backpack": "^0.1.13", - "@solana/wallet-adapter-bitkeep": "^0.3.18", - "@solana/wallet-adapter-bitpie": "^0.5.17", - "@solana/wallet-adapter-blocto": "^0.5.21", - "@solana/wallet-adapter-brave": "^0.1.16", - "@solana/wallet-adapter-censo": "^0.1.3", - "@solana/wallet-adapter-clover": "^0.4.18", - "@solana/wallet-adapter-coin98": "^0.5.19", - "@solana/wallet-adapter-coinbase": "^0.1.17", - "@solana/wallet-adapter-coinhub": "^0.3.17", - "@solana/wallet-adapter-exodus": "^0.1.17", - "@solana/wallet-adapter-fractal": "^0.1.7", - "@solana/wallet-adapter-glow": "^0.1.17", - "@solana/wallet-adapter-huobi": "^0.1.14", - "@solana/wallet-adapter-hyperpay": "^0.1.13", - "@solana/wallet-adapter-keystone": "^0.1.11", - "@solana/wallet-adapter-krystal": "^0.1.11", - "@solana/wallet-adapter-ledger": "^0.9.24", - "@solana/wallet-adapter-magiceden": "^0.1.12", - "@solana/wallet-adapter-mathwallet": "^0.9.17", - "@solana/wallet-adapter-neko": "^0.2.11", - "@solana/wallet-adapter-nightly": "^0.1.15", - "@solana/wallet-adapter-nufi": "^0.1.16", - "@solana/wallet-adapter-onto": "^0.1.6", - "@solana/wallet-adapter-particle": "^0.1.9", - "@solana/wallet-adapter-phantom": "^0.9.22", - "@solana/wallet-adapter-safepal": "^0.5.17", - "@solana/wallet-adapter-saifu": "^0.1.14", - "@solana/wallet-adapter-salmon": "^0.1.13", - "@solana/wallet-adapter-sky": "^0.1.14", - "@solana/wallet-adapter-slope": "^0.5.20", - "@solana/wallet-adapter-solflare": "^0.6.24", - "@solana/wallet-adapter-sollet": "^0.11.16", - "@solana/wallet-adapter-solong": "^0.9.17", - "@solana/wallet-adapter-spot": "^0.1.14", - "@solana/wallet-adapter-strike": "^0.1.12", - "@solana/wallet-adapter-tokenary": "^0.1.11", - "@solana/wallet-adapter-tokenpocket": "^0.4.18", - "@solana/wallet-adapter-torus": "^0.11.27", - "@solana/wallet-adapter-trust": "^0.1.12", - "@solana/wallet-adapter-unsafe-burner": "^0.1.6", - "@solana/wallet-adapter-walletconnect": "^0.1.14", - "@solana/wallet-adapter-xdefi": "^0.1.6" - } - }, "typescript": { "version": "5.1.3", "dev": true @@ -41561,9 +41655,13 @@ "dev": true }, "unload": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/unload/-/unload-2.4.1.tgz", - "integrity": "sha512-IViSAm8Z3sRBYA+9wc0fLQmU9Nrxb16rcDmIiR6Y9LJSZzI7QY5QsDhqPpKOjAn0O9/kfK1TfNEMMAGPTIraPw==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unload/-/unload-2.2.0.tgz", + "integrity": "sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA==", + "requires": { + "@babel/runtime": "^7.6.2", + "detect-node": "^2.0.4" + } }, "unpipe": { "version": "1.0.0", @@ -42006,9 +42104,9 @@ } }, "ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "requires": {} }, "xmlhttprequest-ssl": {