From dd883c9f3d968a6de365e9ca041d1a23540b862c Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Fri, 26 Jul 2024 14:53:24 -0400 Subject: [PATCH 01/11] Use new helper to make Escrow tests faster --- tokens/escrow/anchor/package.json | 2 +- tokens/escrow/anchor/tests/escrow.ts | 146 +++++++++++++-------------- 2 files changed, 70 insertions(+), 78 deletions(-) diff --git a/tokens/escrow/anchor/package.json b/tokens/escrow/anchor/package.json index 47e6ce7da..50dfc4eee 100644 --- a/tokens/escrow/anchor/package.json +++ b/tokens/escrow/anchor/package.json @@ -5,7 +5,7 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.30.0", - "@solana-developers/helpers": "^2.3.0", + "@solana-developers/helpers": "^2.4.0", "@solana/spl-token": "^0.4.6" }, "license": "MIT", diff --git a/tokens/escrow/anchor/tests/escrow.ts b/tokens/escrow/anchor/tests/escrow.ts index c09aad308..2232c5dce 100644 --- a/tokens/escrow/anchor/tests/escrow.ts +++ b/tokens/escrow/anchor/tests/escrow.ts @@ -1,32 +1,30 @@ import { randomBytes } from 'node:crypto'; import * as anchor from '@coral-xyz/anchor'; import { BN, type Program } from '@coral-xyz/anchor'; -import { - MINT_SIZE, - TOKEN_2022_PROGRAM_ID, - type TOKEN_PROGRAM_ID, - createAssociatedTokenAccountIdempotentInstruction, - createInitializeMint2Instruction, - createMintToInstruction, - getAssociatedTokenAddressSync, - getMinimumBalanceForRentExemptMint, -} from '@solana/spl-token'; -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction, type TransactionInstruction } from '@solana/web3.js'; +import { TOKEN_2022_PROGRAM_ID, type TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token'; +import { LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'; import { assert } from 'chai'; import type { Escrow } from '../target/types/escrow'; -import { confirmTransaction, makeKeypairs } from '@solana-developers/helpers'; +import { confirmTransaction, createAccountsMintsAndTokenAccounts, makeKeypairs } from '@solana-developers/helpers'; +// Work on both Token Program and new Token Extensions Program const TOKEN_PROGRAM: typeof TOKEN_2022_PROGRAM_ID | typeof TOKEN_PROGRAM_ID = TOKEN_2022_PROGRAM_ID; +const SECONDS = 1000; + const getRandomBigNumber = (size = 8) => { return new BN(randomBytes(size)); }; describe('escrow', async () => { - anchor.setProvider(anchor.AnchorProvider.env()); + // Use the cluster and the keypair from Anchor.toml + const provider = anchor.AnchorProvider.env(); + anchor.setProvider(provider); - const provider = anchor.getProvider(); + // See https://github.com/coral-xyz/anchor/issues/3122 + const user = (provider.wallet as anchor.Wallet).payer; + const payer = user; const connection = provider.connection; @@ -37,68 +35,12 @@ describe('escrow', async () => { tokenProgram: TOKEN_PROGRAM, }; - const [alice, bob, tokenMintA, tokenMintB] = makeKeypairs(4); - - before('Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users', async () => { - const [aliceTokenAccountA, aliceTokenAccountB, bobTokenAccountA, bobTokenAccountB] = [alice, bob].flatMap((keypair) => - [tokenMintA, tokenMintB].map((mint) => getAssociatedTokenAddressSync(mint.publicKey, keypair.publicKey, false, TOKEN_PROGRAM)), - ); - - // Airdrops to users, and creates two tokens mints 'A' and 'B'" - const minimumLamports = await getMinimumBalanceForRentExemptMint(connection); + let alice: anchor.web3.Keypair; + let bob: anchor.web3.Keypair; + let tokenMintA: anchor.web3.Keypair; + let tokenMintB: anchor.web3.Keypair; - const sendSolInstructions: Array = [alice, bob].map((account) => - SystemProgram.transfer({ - fromPubkey: provider.publicKey, - toPubkey: account.publicKey, - lamports: 10 * LAMPORTS_PER_SOL, - }), - ); - - const createMintInstructions: Array = [tokenMintA, tokenMintB].map((mint) => - SystemProgram.createAccount({ - fromPubkey: provider.publicKey, - newAccountPubkey: mint.publicKey, - lamports: minimumLamports, - space: MINT_SIZE, - programId: TOKEN_PROGRAM, - }), - ); - - // Make tokenA and tokenB mints, mint tokens and create ATAs - const mintTokensInstructions: Array = [ - { - mint: tokenMintA.publicKey, - authority: alice.publicKey, - ata: aliceTokenAccountA, - }, - { - mint: tokenMintB.publicKey, - authority: bob.publicKey, - ata: bobTokenAccountB, - }, - ].flatMap((mintDetails) => [ - createInitializeMint2Instruction(mintDetails.mint, 6, mintDetails.authority, null, TOKEN_PROGRAM), - createAssociatedTokenAccountIdempotentInstruction(provider.publicKey, mintDetails.ata, mintDetails.authority, mintDetails.mint, TOKEN_PROGRAM), - createMintToInstruction(mintDetails.mint, mintDetails.ata, mintDetails.authority, 1_000_000_000, [], TOKEN_PROGRAM), - ]); - - // Add all these instructions to our transaction - const tx = new Transaction(); - tx.instructions = [...sendSolInstructions, ...createMintInstructions, ...mintTokensInstructions]; - - await provider.sendAndConfirm(tx, [tokenMintA, tokenMintB, alice, bob]); - - // Save the accounts for later use - accounts.maker = alice.publicKey; - accounts.taker = bob.publicKey; - accounts.tokenMintA = tokenMintA.publicKey; - accounts.makerTokenAccountA = aliceTokenAccountA; - accounts.takerTokenAccountA = bobTokenAccountA; - accounts.tokenMintB = tokenMintB.publicKey; - accounts.makerTokenAccountB = aliceTokenAccountB; - accounts.takerTokenAccountB = bobTokenAccountB; - }); + [alice, bob, tokenMintA, tokenMintB] = makeKeypairs(4); const tokenAOfferedAmount = new BN(1_000_000); const tokenBWantedAmount = new BN(1_000_000); @@ -164,11 +106,61 @@ describe('escrow', async () => { assert(aliceTokenAccountBalanceAfter.eq(tokenBWantedAmount)); }; + before('Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users', async () => { + const usersMintsAndTokenAccounts = await createAccountsMintsAndTokenAccounts( + [ + // Alice's token balances + [ + // 1_000_000_000 of token A + 1_000_000_000, + // 0 of token B + 0, + ], + // Bob's token balances + [ + // 0 of token A + 0, + // 1_000_000_000 of token B + 1_000_000_000, + ], + ], + 1 * LAMPORTS_PER_SOL, + connection, + payer, + ); + + const users = usersMintsAndTokenAccounts.users; + alice = users[0]; + bob = users[1]; + + const mints = usersMintsAndTokenAccounts.mints; + tokenMintA = mints[0]; + tokenMintB = mints[1]; + + const tokenAccounts = usersMintsAndTokenAccounts.tokenAccounts; + + const aliceTokenAccountA = tokenAccounts[0][0]; + const aliceTokenAccountB = tokenAccounts[0][1]; + + const bobTokenAccountA = tokenAccounts[1][0]; + const bobTokenAccountB = tokenAccounts[1][1]; + + // Save the accounts for later use + accounts.maker = alice.publicKey; + accounts.taker = bob.publicKey; + accounts.tokenMintA = tokenMintA.publicKey; + accounts.makerTokenAccountA = aliceTokenAccountA; + accounts.takerTokenAccountA = bobTokenAccountA; + accounts.tokenMintB = tokenMintB.publicKey; + accounts.makerTokenAccountB = aliceTokenAccountB; + accounts.takerTokenAccountB = bobTokenAccountB; + }); + it('Puts the tokens Alice offers into the vault when Alice makes an offer', async () => { await make(); - }); + }).slow(60 * SECONDS); it("Puts the tokens from the vault into Bob's account, and gives Alice Bob's tokens, when Bob takes an offer", async () => { await take(); - }); + }).slow(60 * SECONDS); }); From fcd19efa895a450a96a04d1b7af4bd057fd3fd2a Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Fri, 26 Jul 2024 16:27:33 -0400 Subject: [PATCH 02/11] Update pnpm lock --- tokens/escrow/anchor/pnpm-lock.yaml | 2088 ++++++++++++++++----------- 1 file changed, 1263 insertions(+), 825 deletions(-) diff --git a/tokens/escrow/anchor/pnpm-lock.yaml b/tokens/escrow/anchor/pnpm-lock.yaml index 9f8ee854a..ae61bfbac 100644 --- a/tokens/escrow/anchor/pnpm-lock.yaml +++ b/tokens/escrow/anchor/pnpm-lock.yaml @@ -1,587 +1,373 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - '@coral-xyz/anchor': - specifier: ^0.30.0 - version: 0.30.0 - '@solana-developers/helpers': - specifier: ^2.3.0 - version: 2.3.0 - '@solana/spl-token': - specifier: ^0.4.6 - version: 0.4.6(@solana/web3.js@1.93.0)(fastestsmallesttextencoderdecoder@1.0.22) - -devDependencies: - '@types/bn.js': - specifier: ^5.1.0 - version: 5.1.5 - '@types/chai': - specifier: ^4.3.0 - version: 4.3.16 - '@types/mocha': - specifier: ^9.0.0 - version: 9.1.1 - chai: - specifier: ^4.3.4 - version: 4.4.1 - mocha: - specifier: ^9.0.3 - version: 9.2.2 - prettier: - specifier: ^2.6.2 - version: 2.8.8 - ts-mocha: - specifier: ^10.0.0 - version: 10.0.0(mocha@9.2.2) - typescript: - specifier: ^4.3.5 - version: 4.9.5 +importers: + + .: + dependencies: + '@coral-xyz/anchor': + specifier: ^0.30.0 + version: 0.30.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana-developers/helpers': + specifier: ^2.4.0 + version: 2.4.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10) + '@solana/spl-token': + specifier: ^0.4.6 + version: 0.4.6(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) + devDependencies: + '@types/bn.js': + specifier: ^5.1.0 + version: 5.1.5 + '@types/chai': + specifier: ^4.3.0 + version: 4.3.16 + '@types/mocha': + specifier: ^9.0.0 + version: 9.1.1 + chai: + specifier: ^4.3.4 + version: 4.4.1 + mocha: + specifier: ^9.0.3 + version: 9.2.2 + prettier: + specifier: ^2.6.2 + version: 2.8.8 + ts-mocha: + specifier: ^10.0.0 + version: 10.0.0(mocha@9.2.2) + typescript: + specifier: ^4.3.5 + version: 4.9.5 packages: - /@babel/runtime@7.24.7: + '@babel/runtime@7.24.7': resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==} engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.14.1 - dev: false - /@coral-xyz/anchor@0.30.0: + '@babel/runtime@7.25.0': + resolution: {integrity: sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==} + engines: {node: '>=6.9.0'} + + '@coral-xyz/anchor@0.30.0': resolution: {integrity: sha512-qreDh5ztiRHVnCbJ+RS70NJ6aSTPBYDAgFeQ7Z5QvaT5DcDIhNyt4onOciVz2ieIE1XWePOJDDu9SbNvPGBkvQ==} engines: {node: '>=11'} - dependencies: - '@coral-xyz/borsh': 0.30.0(@solana/web3.js@1.93.0) - '@noble/hashes': 1.4.0 - '@solana/web3.js': 1.93.0 - bn.js: 5.2.1 - bs58: 4.0.1 - buffer-layout: 1.2.2 - camelcase: 6.3.0 - cross-fetch: 3.1.8 - crypto-hash: 1.3.0 - eventemitter3: 4.0.7 - pako: 2.1.0 - snake-case: 3.0.4 - superstruct: 0.15.5 - toml: 3.0.0 - transitivePeerDependencies: - - bufferutil - - encoding - - utf-8-validate - dev: false - /@coral-xyz/borsh@0.30.0(@solana/web3.js@1.93.0): + '@coral-xyz/borsh@0.30.0': resolution: {integrity: sha512-OrcV+7N10cChhgDRUxM4iEIuwxUHHs52XD85R8cFCUqE0vbLYrcoPPPs+VF6kZ9DhdJGVW2I6DHJOp5TykyZog==} engines: {node: '>=10'} peerDependencies: '@solana/web3.js': ^1.68.0 - dependencies: - '@solana/web3.js': 1.93.0 - bn.js: 5.2.1 - buffer-layout: 1.2.2 - dev: false - /@noble/curves@1.4.0: + '@noble/curves@1.4.0': resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} - dependencies: - '@noble/hashes': 1.4.0 - dev: false - /@noble/hashes@1.4.0: + '@noble/curves@1.4.2': + resolution: {integrity: sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==} + + '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} - dev: false - /@solana-developers/helpers@2.3.0: - resolution: {integrity: sha512-OVdm/RJ9OMI23AnBYX/8UWuNtHRUxaXRUzhXo4WRtXYPHdQ+jTFS2TsjKSJ/F3a0kUZ6nN0b5TekFZvqYF0Qdg==} - dependencies: - '@solana/web3.js': 1.93.0 - bs58: 5.0.0 - dotenv: 16.4.5 - transitivePeerDependencies: - - bufferutil - - encoding - - utf-8-validate - dev: false + '@solana-developers/helpers@2.4.0': + resolution: {integrity: sha512-eiqHOluJlP9cYfAkgSLaM6o5etWfbBbjNnR3AL0Ds09CJdA3A61qimCPQFmjiLynAb6U7/NSWq0Q28/hnb02Bw==} - /@solana/buffer-layout-utils@0.2.0: + '@solana/buffer-layout-utils@0.2.0': resolution: {integrity: sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==} engines: {node: '>= 10'} - dependencies: - '@solana/buffer-layout': 4.0.1 - '@solana/web3.js': 1.93.0 - bigint-buffer: 1.1.5 - bignumber.js: 9.1.2 - transitivePeerDependencies: - - bufferutil - - encoding - - utf-8-validate - dev: false - /@solana/buffer-layout@4.0.1: + '@solana/buffer-layout@4.0.1': resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} engines: {node: '>=5.10'} - dependencies: - buffer: 6.0.3 - dev: false - /@solana/codecs-core@2.0.0-preview.2: + '@solana/codecs-core@2.0.0-preview.2': resolution: {integrity: sha512-gLhCJXieSCrAU7acUJjbXl+IbGnqovvxQLlimztPoGgfLQ1wFYu+XJswrEVQqknZYK1pgxpxH3rZ+OKFs0ndQg==} - dependencies: - '@solana/errors': 2.0.0-preview.2 - dev: false - /@solana/codecs-data-structures@2.0.0-preview.2: + '@solana/codecs-core@2.0.0-preview.4': + resolution: {integrity: sha512-A0VVuDDA5kNKZUinOqHxJQK32aKTucaVbvn31YenGzHX1gPqq+SOnFwgaEY6pq4XEopSmaK16w938ZQS8IvCnw==} + peerDependencies: + typescript: '>=5' + + '@solana/codecs-data-structures@2.0.0-preview.2': resolution: {integrity: sha512-Xf5vIfromOZo94Q8HbR04TbgTwzigqrKII0GjYr21K7rb3nba4hUW2ir8kguY7HWFBcjHGlU5x3MevKBOLp3Zg==} - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/errors': 2.0.0-preview.2 - dev: false - /@solana/codecs-numbers@2.0.0-preview.2: + '@solana/codecs-data-structures@2.0.0-preview.4': + resolution: {integrity: sha512-nt2k2eTeyzlI/ccutPcG36M/J8NAYfxBPI9h/nQjgJ+M+IgOKi31JV8StDDlG/1XvY0zyqugV3I0r3KAbZRJpA==} + peerDependencies: + typescript: '>=5' + + '@solana/codecs-numbers@2.0.0-preview.2': resolution: {integrity: sha512-aLZnDTf43z4qOnpTcDsUVy1Ci9im1Md8thWipSWbE+WM9ojZAx528oAql+Cv8M8N+6ALKwgVRhPZkto6E59ARw==} - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/errors': 2.0.0-preview.2 - dev: false - /@solana/codecs-strings@2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22): + '@solana/codecs-numbers@2.0.0-preview.4': + resolution: {integrity: sha512-Q061rLtMadsO7uxpguT+Z7G4UHnjQ6moVIxAQxR58nLxDPCC7MB1Pk106/Z7NDhDLHTcd18uO6DZ7ajHZEn2XQ==} + peerDependencies: + typescript: '>=5' + + '@solana/codecs-strings@2.0.0-preview.2': resolution: {integrity: sha512-EgBwY+lIaHHgMJIqVOGHfIfpdmmUDNoNO/GAUGeFPf+q0dF+DtwhJPEMShhzh64X2MeCZcmSO6Kinx0Bvmmz2g==} peerDependencies: fastestsmallesttextencoderdecoder: ^1.0.22 - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/errors': 2.0.0-preview.2 - fastestsmallesttextencoderdecoder: 1.0.22 - dev: false - /@solana/codecs@2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22): + '@solana/codecs-strings@2.0.0-preview.4': + resolution: {integrity: sha512-YDbsQePRWm+xnrfS64losSGRg8Wb76cjK1K6qfR8LPmdwIC3787x9uW5/E4icl/k+9nwgbIRXZ65lpF+ucZUnw==} + peerDependencies: + fastestsmallesttextencoderdecoder: ^1.0.22 + typescript: '>=5' + + '@solana/codecs@2.0.0-preview.2': resolution: {integrity: sha512-4HHzCD5+pOSmSB71X6w9ptweV48Zj1Vqhe732+pcAQ2cMNnN0gMPMdDq7j3YwaZDZ7yrILVV/3+HTnfT77t2yA==} - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-data-structures': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/codecs-strings': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/options': 2.0.0-preview.2 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - dev: false - /@solana/errors@2.0.0-preview.2: + '@solana/codecs@2.0.0-preview.4': + resolution: {integrity: sha512-gLMupqI4i+G4uPi2SGF/Tc1aXcviZF2ybC81x7Q/fARamNSgNOCUUoSCg9nWu1Gid6+UhA7LH80sWI8XjKaRog==} + peerDependencies: + typescript: '>=5' + + '@solana/errors@2.0.0-preview.2': resolution: {integrity: sha512-H2DZ1l3iYF5Rp5pPbJpmmtCauWeQXRJapkDg8epQ8BJ7cA2Ut/QEtC3CMmw/iMTcuS6uemFNLcWvlOfoQhvQuA==} hasBin: true - dependencies: - chalk: 5.3.0 - commander: 12.1.0 - dev: false - /@solana/options@2.0.0-preview.2: + '@solana/errors@2.0.0-preview.4': + resolution: {integrity: sha512-kadtlbRv2LCWr8A9V22On15Us7Nn8BvqNaOB4hXsTB3O0fU40D1ru2l+cReqLcRPij4znqlRzW9Xi0m6J5DIhA==} + hasBin: true + peerDependencies: + typescript: '>=5' + + '@solana/options@2.0.0-preview.2': resolution: {integrity: sha512-FAHqEeH0cVsUOTzjl5OfUBw2cyT8d5Oekx4xcn5hn+NyPAfQJgM3CEThzgRD6Q/4mM5pVUnND3oK/Mt1RzSE/w==} - dependencies: - '@solana/codecs-core': 2.0.0-preview.2 - '@solana/codecs-numbers': 2.0.0-preview.2 - dev: false - /@solana/spl-token-group@0.0.4(@solana/web3.js@1.93.0)(fastestsmallesttextencoderdecoder@1.0.22): + '@solana/options@2.0.0-preview.4': + resolution: {integrity: sha512-tv2O/Frxql/wSe3jbzi5nVicIWIus/BftH+5ZR+r9r3FO0/htEllZS5Q9XdbmSboHu+St87584JXeDx3xm4jaA==} + peerDependencies: + typescript: '>=5' + + '@solana/spl-token-group@0.0.4': resolution: {integrity: sha512-7+80nrEMdUKlK37V6kOe024+T7J4nNss0F8LQ9OOPYdWCCfJmsGUzVx2W3oeizZR4IHM6N4yC9v1Xqwc3BTPWw==} engines: {node: '>=16'} peerDependencies: '@solana/web3.js': ^1.91.6 - dependencies: - '@solana/codecs': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/spl-type-length-value': 0.1.0 - '@solana/web3.js': 1.93.0 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - dev: false - /@solana/spl-token-metadata@0.1.4(@solana/web3.js@1.93.0)(fastestsmallesttextencoderdecoder@1.0.22): + '@solana/spl-token-group@0.0.5': + resolution: {integrity: sha512-CLJnWEcdoUBpQJfx9WEbX3h6nTdNiUzswfFdkABUik7HVwSNA98u5AYvBVK2H93d9PGMOHAak2lHW9xr+zAJGQ==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.94.0 + + '@solana/spl-token-metadata@0.1.4': resolution: {integrity: sha512-N3gZ8DlW6NWDV28+vCCDJoTqaCZiF/jDUnk3o8GRkAFzHObiR60Bs1gXHBa8zCPdvOwiG6Z3dg5pg7+RW6XNsQ==} engines: {node: '>=16'} peerDependencies: '@solana/web3.js': ^1.91.6 - dependencies: - '@solana/codecs': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/spl-type-length-value': 0.1.0 - '@solana/web3.js': 1.93.0 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - dev: false - /@solana/spl-token@0.4.6(@solana/web3.js@1.93.0)(fastestsmallesttextencoderdecoder@1.0.22): + '@solana/spl-token@0.4.6': resolution: {integrity: sha512-1nCnUqfHVtdguFciVWaY/RKcQz1IF4b31jnKgAmjU9QVN1q7dRUkTEWJZgTYIEtsULjVnC9jRqlhgGN39WbKKA==} engines: {node: '>=16'} peerDependencies: '@solana/web3.js': ^1.91.6 - dependencies: - '@solana/buffer-layout': 4.0.1 - '@solana/buffer-layout-utils': 0.2.0 - '@solana/spl-token-group': 0.0.4(@solana/web3.js@1.93.0)(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/spl-token-metadata': 0.1.4(@solana/web3.js@1.93.0)(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/web3.js': 1.93.0 - buffer: 6.0.3 - transitivePeerDependencies: - - bufferutil - - encoding - - fastestsmallesttextencoderdecoder - - utf-8-validate - dev: false - /@solana/spl-type-length-value@0.1.0: + '@solana/spl-token@0.4.8': + resolution: {integrity: sha512-RO0JD9vPRi4LsAbMUdNbDJ5/cv2z11MGhtAvFeRzT4+hAGE/FUzRi0tkkWtuCfSIU3twC6CtmAihRp/+XXjWsA==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.94.0 + + '@solana/spl-type-length-value@0.1.0': resolution: {integrity: sha512-JBMGB0oR4lPttOZ5XiUGyvylwLQjt1CPJa6qQ5oM+MBCndfjz2TKKkw0eATlLLcYmq1jBVsNlJ2cD6ns2GR7lA==} engines: {node: '>=16'} - dependencies: - buffer: 6.0.3 - dev: false - /@solana/web3.js@1.93.0: + '@solana/web3.js@1.93.0': resolution: {integrity: sha512-suf4VYwWxERz4tKoPpXCRHFRNst7jmcFUaD65kII+zg9urpy5PeeqgLV6G5eWGzcVzA9tZeXOju1A1Y+0ojEVw==} - dependencies: - '@babel/runtime': 7.24.7 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@solana/buffer-layout': 4.0.1 - agentkeepalive: 4.5.0 - bigint-buffer: 1.1.5 - bn.js: 5.2.1 - borsh: 0.7.0 - bs58: 4.0.1 - buffer: 6.0.3 - fast-stable-stringify: 1.0.0 - jayson: 4.1.0 - node-fetch: 2.7.0 - rpc-websockets: 9.0.1 - superstruct: 1.0.4 - transitivePeerDependencies: - - bufferutil - - encoding - - utf-8-validate - dev: false - /@swc/helpers@0.5.11: + '@solana/web3.js@1.95.2': + resolution: {integrity: sha512-SjlHp0G4qhuhkQQc+YXdGkI8EerCqwxvgytMgBpzMUQTafrkNant3e7pgilBGgjy/iM40ICvWBLgASTPMrQU7w==} + + '@swc/helpers@0.5.11': resolution: {integrity: sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A==} - dependencies: - tslib: 2.6.3 - dev: false - /@types/bn.js@5.1.5: + '@types/bn.js@5.1.5': resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} - dependencies: - '@types/node': 20.14.2 - dev: true - /@types/chai@4.3.16: + '@types/chai@4.3.16': resolution: {integrity: sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==} - dev: true - /@types/connect@3.4.38: + '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - dependencies: - '@types/node': 12.20.55 - dev: false - /@types/json5@0.0.29: + '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - requiresBuild: true - dev: true - optional: true - /@types/mocha@9.1.1: + '@types/mocha@9.1.1': resolution: {integrity: sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==} - dev: true - /@types/node@12.20.55: + '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - dev: false - /@types/node@20.14.2: + '@types/node@20.14.2': resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} - dependencies: - undici-types: 5.26.5 - /@types/uuid@8.3.4: + '@types/uuid@8.3.4': resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} - dev: false - /@types/ws@7.4.7: + '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} - dependencies: - '@types/node': 12.20.55 - dev: false - /@types/ws@8.5.10: + '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} - dependencies: - '@types/node': 20.14.2 - dev: false - /@ungap/promise-all-settled@1.1.2: + '@ungap/promise-all-settled@1.1.2': resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} - dev: true - /JSONStream@1.3.5: + JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true - dependencies: - jsonparse: 1.3.1 - through: 2.3.8 - dev: false - /agentkeepalive@4.5.0: + agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} - dependencies: - humanize-ms: 1.2.1 - dev: false - /ansi-colors@4.1.1: + ansi-colors@4.1.1: resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} engines: {node: '>=6'} - dev: true - /ansi-regex@5.0.1: + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - dev: true - /ansi-styles@4.3.0: + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true - /anymatch@3.1.3: + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - /argparse@2.0.1: + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - /arrify@1.0.1: + arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} - dev: true - /assertion-error@1.1.0: + assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - dev: true - /balanced-match@1.0.2: + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - /base-x@3.0.9: + base-x@3.0.9: resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} - dependencies: - safe-buffer: 5.2.1 - dev: false - /base-x@4.0.0: - resolution: {integrity: sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==} - dev: false + base-x@5.0.0: + resolution: {integrity: sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ==} - /base64-js@1.5.1: + base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: false - /bigint-buffer@1.1.5: + bigint-buffer@1.1.5: resolution: {integrity: sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==} engines: {node: '>= 10.0.0'} - requiresBuild: true - dependencies: - bindings: 1.5.0 - dev: false - /bignumber.js@9.1.2: + bignumber.js@9.1.2: resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} - dev: false - /binary-extensions@2.3.0: + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - dev: true - /bindings@1.5.0: + bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - dependencies: - file-uri-to-path: 1.0.0 - dev: false - /bn.js@5.2.1: + bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - dev: false - /borsh@0.7.0: + borsh@0.7.0: resolution: {integrity: sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==} - dependencies: - bn.js: 5.2.1 - bs58: 4.0.1 - text-encoding-utf-8: 1.0.2 - dev: false - /brace-expansion@1.1.11: + brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - /braces@3.0.3: + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - dependencies: - fill-range: 7.1.1 - dev: true - /browser-stdout@1.3.1: + browser-stdout@1.3.1: resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - dev: true - /bs58@4.0.1: + bs58@4.0.1: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} - dependencies: - base-x: 3.0.9 - dev: false - /bs58@5.0.0: - resolution: {integrity: sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==} - dependencies: - base-x: 4.0.0 - dev: false + bs58@6.0.0: + resolution: {integrity: sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==} - /buffer-from@1.1.2: + buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - /buffer-layout@1.2.2: + buffer-layout@1.2.2: resolution: {integrity: sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==} engines: {node: '>=4.5'} - dev: false - /buffer@6.0.3: + buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - dev: false - /bufferutil@4.0.8: + bufferutil@4.0.8: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} - requiresBuild: true - dependencies: - node-gyp-build: 4.8.1 - dev: false - /camelcase@6.3.0: + camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - /chai@4.4.1: + chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.3 - deep-eql: 4.1.4 - get-func-name: 2.0.2 - loupe: 2.3.7 - pathval: 1.1.1 - type-detect: 4.0.8 - dev: true - /chalk@4.1.2: + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - /chalk@5.3.0: + chalk@5.3.0: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: false - /check-error@1.0.3: + check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} - dependencies: - get-func-name: 2.0.2 - dev: true - /chokidar@3.5.3: + chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - dev: true - /cliui@7.0.4: + cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - /color-convert@2.0.1: + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: true - /color-name@1.1.4: + color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true - /commander@12.1.0: + commander@12.1.0: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} - dev: false - /commander@2.20.3: + commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: false - /concat-map@0.0.1: + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true - /cross-fetch@3.1.8: + cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} - dependencies: - node-fetch: 2.7.0 - transitivePeerDependencies: - - encoding - dev: false - /crypto-hash@1.3.0: + crypto-hash@1.3.0: resolution: {integrity: sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==} engines: {node: '>=8'} - dev: false - /debug@4.3.3(supports-color@8.1.1): + debug@4.3.3: resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} engines: {node: '>=6.0'} peerDependencies: @@ -589,401 +375,242 @@ packages: peerDependenciesMeta: supports-color: optional: true - dependencies: - ms: 2.1.2 - supports-color: 8.1.1 - dev: true - /decamelize@4.0.0: + decamelize@4.0.0: resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} engines: {node: '>=10'} - dev: true - /deep-eql@4.1.4: + deep-eql@4.1.4: resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} engines: {node: '>=6'} - dependencies: - type-detect: 4.0.8 - dev: true - /delay@5.0.0: + delay@5.0.0: resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} engines: {node: '>=10'} - dev: false - /diff@3.5.0: + diff@3.5.0: resolution: {integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==} engines: {node: '>=0.3.1'} - dev: true - /diff@5.0.0: + diff@5.0.0: resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} engines: {node: '>=0.3.1'} - dev: true - /dot-case@3.0.4: + dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} - dependencies: - no-case: 3.0.4 - tslib: 2.6.3 - dev: false - /dotenv@16.4.5: + dotenv@16.4.5: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} - dev: false - /emoji-regex@8.0.0: + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true - /es6-promise@4.2.8: + es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} - dev: false - /es6-promisify@5.0.0: + es6-promisify@5.0.0: resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} - dependencies: - es6-promise: 4.2.8 - dev: false - /escalade@3.1.2: + escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} - dev: true - /escape-string-regexp@4.0.0: + escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - dev: true - /eventemitter3@4.0.7: + eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} - dev: false - /eventemitter3@5.0.1: + eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - dev: false - /eyes@0.1.8: + eyes@0.1.8: resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} engines: {node: '> 0.1.90'} - dev: false - /fast-stable-stringify@1.0.0: + fast-stable-stringify@1.0.0: resolution: {integrity: sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==} - dev: false - /fastestsmallesttextencoderdecoder@1.0.22: + fastestsmallesttextencoderdecoder@1.0.22: resolution: {integrity: sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==} - dev: false - /file-uri-to-path@1.0.0: + file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - dev: false - /fill-range@7.1.1: + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - /find-up@5.0.0: + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true - /flat@5.0.2: + flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - dev: true - /fs.realpath@1.0.0: + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - /fsevents@2.3.3: + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - requiresBuild: true - dev: true - optional: true - /get-caller-file@2.0.5: + get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: true - /get-func-name@2.0.2: + get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} - dev: true - /glob-parent@5.1.2: + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - /glob@7.2.0: + glob@7.2.0: resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} deprecated: Glob versions prior to v9 are no longer supported - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - /growl@1.10.5: + growl@1.10.5: resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} engines: {node: '>=4.x'} - dev: true - /has-flag@4.0.0: + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - dev: true - /he@1.2.0: + he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true - dev: true - /humanize-ms@1.2.1: + humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} - dependencies: - ms: 2.1.3 - dev: false - /ieee754@1.2.1: + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: false - /inflight@1.0.6: + inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - /inherits@2.0.4: + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - /is-binary-path@2.1.0: + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} - dependencies: - binary-extensions: 2.3.0 - dev: true - /is-extglob@2.1.1: + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - dev: true - /is-fullwidth-code-point@3.0.0: + is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - dev: true - /is-glob@4.0.3: + is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - /is-number@7.0.0: + is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - dev: true - /is-plain-obj@2.1.0: + is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} - dev: true - /is-unicode-supported@0.1.0: + is-unicode-supported@0.1.0: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} - dev: true - /isexe@2.0.0: + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true - /isomorphic-ws@4.0.1(ws@7.5.9): + isomorphic-ws@4.0.1: resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} peerDependencies: ws: '*' - dependencies: - ws: 7.5.9 - dev: false - /jayson@4.1.0: + jayson@4.1.0: resolution: {integrity: sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==} engines: {node: '>=8'} hasBin: true - dependencies: - '@types/connect': 3.4.38 - '@types/node': 12.20.55 - '@types/ws': 7.4.7 - 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(ws@7.5.9) - json-stringify-safe: 5.0.1 - uuid: 8.3.2 - ws: 7.5.9 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: false - /js-yaml@4.1.0: + jayson@4.1.1: + resolution: {integrity: sha512-5ZWm4Q/0DHPyeMfAsrwViwUS2DMVsQgWh8bEEIVTkfb3DzHZ2L3G5WUnF+AKmGjjM9r1uAv73SaqC1/U4RL45w==} + engines: {node: '>=8'} + hasBin: true + + js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - /json-stringify-safe@5.0.1: + json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} - dev: false - /json5@1.0.2: + json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true - requiresBuild: true - dependencies: - minimist: 1.2.8 - dev: true - optional: true - /jsonparse@1.3.1: + jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} - dev: false - /locate-path@6.0.0: + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - dependencies: - p-locate: 5.0.0 - dev: true - /log-symbols@4.1.0: + log-symbols@4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - dev: true - /loupe@2.3.7: + loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} - dependencies: - get-func-name: 2.0.2 - dev: true - /lower-case@2.0.2: + lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} - dependencies: - tslib: 2.6.3 - dev: false - /make-error@1.3.6: + make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true - /minimatch@3.1.2: + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - /minimatch@4.2.1: + minimatch@4.2.1: resolution: {integrity: sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==} engines: {node: '>=10'} - dependencies: - brace-expansion: 1.1.11 - dev: true - /minimist@1.2.8: + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true - /mkdirp@0.5.6: + mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true - dependencies: - minimist: 1.2.8 - dev: true - /mocha@9.2.2: + mocha@9.2.2: resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==} engines: {node: '>= 12.0.0'} hasBin: true - dependencies: - '@ungap/promise-all-settled': 1.1.2 - ansi-colors: 4.1.1 - browser-stdout: 1.3.1 - chokidar: 3.5.3 - debug: 4.3.3(supports-color@8.1.1) - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 7.2.0 - growl: 1.10.5 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 4.2.1 - ms: 2.1.3 - nanoid: 3.3.1 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - which: 2.0.2 - workerpool: 6.2.0 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 - dev: true - /ms@2.1.2: + ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true - /ms@2.1.3: + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - /nanoid@3.3.1: + nanoid@3.3.1: resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: true - /no-case@3.0.4: + no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - dependencies: - lower-case: 2.0.2 - tslib: 2.6.3 - dev: false - /node-fetch@2.7.0: + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: @@ -991,316 +618,208 @@ packages: peerDependenciesMeta: encoding: optional: true - dependencies: - whatwg-url: 5.0.0 - dev: false - /node-gyp-build@4.8.1: + node-gyp-build@4.8.1: resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} hasBin: true - requiresBuild: true - dev: false - /normalize-path@3.0.0: + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - dev: true - /once@1.4.0: + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - /p-limit@3.1.0: + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true - /p-locate@5.0.0: + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true - /pako@2.1.0: + pako@2.1.0: resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} - dev: false - /path-exists@4.0.0: + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - dev: true - /path-is-absolute@1.0.1: + path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - dev: true - /pathval@1.1.1: + pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - dev: true - /picomatch@2.3.1: + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - dev: true - /prettier@2.8.8: + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true - dev: true - /randombytes@2.1.0: + randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - /readdirp@3.6.0: + readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - /regenerator-runtime@0.14.1: + regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - dev: false - /require-directory@2.1.1: + require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: true - /rpc-websockets@9.0.1: + rpc-websockets@9.0.1: resolution: {integrity: sha512-JCkdc/TfJBGRfmjIFK7cmqX79nwPWUd9xCM0DAydRbdLShsW3j/GV2gmPlaFa8V1+2u4V/O47fm4ZR5+F6HyDw==} - dependencies: - '@swc/helpers': 0.5.11 - '@types/uuid': 8.3.4 - '@types/ws': 8.5.10 - buffer: 6.0.3 - eventemitter3: 5.0.1 - uuid: 8.3.2 - ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - dev: false - /safe-buffer@5.2.1: + rpc-websockets@9.0.2: + resolution: {integrity: sha512-YzggvfItxMY3Lwuax5rC18inhbjJv9Py7JXRHxTIi94JOLrqBsSsUUc5bbl5W6c11tXhdfpDPK0KzBhoGe8jjw==} + + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - /serialize-javascript@6.0.0: + serialize-javascript@6.0.0: resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} - dependencies: - randombytes: 2.1.0 - dev: true - /snake-case@3.0.4: + snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - dependencies: - dot-case: 3.0.4 - tslib: 2.6.3 - dev: false - /source-map-support@0.5.21: + source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - /source-map@0.6.1: + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - dev: true - /string-width@4.2.3: + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - /strip-ansi@6.0.1: + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - /strip-bom@3.0.0: + strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - requiresBuild: true - dev: true - optional: true - /strip-json-comments@3.1.1: + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - dev: true - /superstruct@0.15.5: + superstruct@0.15.5: resolution: {integrity: sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==} - dev: false - /superstruct@1.0.4: + superstruct@1.0.4: resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} engines: {node: '>=14.0.0'} - dev: false - /supports-color@7.2.0: + superstruct@2.0.2: + resolution: {integrity: sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==} + engines: {node: '>=14.0.0'} + + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: true - /supports-color@8.1.1: + supports-color@8.1.1: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} - dependencies: - has-flag: 4.0.0 - dev: true - /text-encoding-utf-8@1.0.2: + text-encoding-utf-8@1.0.2: resolution: {integrity: sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==} - dev: false - /through@2.3.8: + through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: false - /to-regex-range@5.0.1: + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - /toml@3.0.0: + toml@3.0.0: resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} - dev: false - /tr46@0.0.3: + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false - /ts-mocha@10.0.0(mocha@9.2.2): + ts-mocha@10.0.0: resolution: {integrity: sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==} engines: {node: '>= 6.X.X'} hasBin: true peerDependencies: mocha: ^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X - dependencies: - mocha: 9.2.2 - ts-node: 7.0.1 - optionalDependencies: - tsconfig-paths: 3.15.0 - dev: true - /ts-node@7.0.1: + ts-node@7.0.1: resolution: {integrity: sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==} engines: {node: '>=4.2.0'} hasBin: true - dependencies: - arrify: 1.0.1 - buffer-from: 1.1.2 - diff: 3.5.0 - make-error: 1.3.6 - minimist: 1.2.8 - mkdirp: 0.5.6 - source-map-support: 0.5.21 - yn: 2.0.0 - dev: true - /tsconfig-paths@3.15.0: + tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - requiresBuild: true - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - dev: true - optional: true - /tslib@2.6.3: + tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} - dev: false - /type-detect@4.0.8: + type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} - dev: true - /typescript@4.9.5: + typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true - dev: true - /undici-types@5.26.5: + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - /utf-8-validate@5.0.10: + utf-8-validate@5.0.10: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} - requiresBuild: true - dependencies: - node-gyp-build: 4.8.1 - dev: false - /uuid@8.3.2: + uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true - dev: false - /webidl-conversions@3.0.1: + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false - /whatwg-url@5.0.0: + whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - dev: false - /which@2.0.2: + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - /workerpool@6.2.0: + workerpool@6.2.0: resolution: {integrity: sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==} - dev: true - /wrap-ansi@7.0.0: + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - /wrappy@1.0.2: + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - /ws@7.5.9: + ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} + 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 + + ws@7.5.9: resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} engines: {node: '>=8.3.0'} peerDependencies: @@ -1311,9 +830,8 @@ packages: optional: true utf-8-validate: optional: true - dev: false - /ws@8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@8.17.0: resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} engines: {node: '>=10.0.0'} peerDependencies: @@ -1324,50 +842,970 @@ packages: optional: true utf-8-validate: optional: true - dependencies: - bufferutil: 4.0.8 - utf-8-validate: 5.0.10 - dev: false - /y18n@5.0.8: + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - dev: true - /yargs-parser@20.2.4: + yargs-parser@20.2.4: resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} engines: {node: '>=10'} - dev: true - /yargs-unparser@2.0.0: + yargs-unparser@2.0.0: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} engines: {node: '>=10'} - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - dev: true - /yargs@16.2.0: + yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.2 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.4 - dev: true - /yn@2.0.0: + yn@2.0.0: resolution: {integrity: sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==} engines: {node: '>=4'} - dev: true - /yocto-queue@0.1.0: + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - dev: true + +snapshots: + + '@babel/runtime@7.24.7': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/runtime@7.25.0': + dependencies: + regenerator-runtime: 0.14.1 + + '@coral-xyz/anchor@0.30.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@coral-xyz/borsh': 0.30.0(@solana/web3.js@1.93.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@noble/hashes': 1.4.0 + '@solana/web3.js': 1.93.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + bn.js: 5.2.1 + bs58: 4.0.1 + buffer-layout: 1.2.2 + camelcase: 6.3.0 + cross-fetch: 3.1.8 + crypto-hash: 1.3.0 + eventemitter3: 4.0.7 + pako: 2.1.0 + snake-case: 3.0.4 + superstruct: 0.15.5 + toml: 3.0.0 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + '@coral-xyz/borsh@0.30.0(@solana/web3.js@1.93.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + dependencies: + '@solana/web3.js': 1.93.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + bn.js: 5.2.1 + buffer-layout: 1.2.2 + + '@noble/curves@1.4.0': + dependencies: + '@noble/hashes': 1.4.0 + + '@noble/curves@1.4.2': + dependencies: + '@noble/hashes': 1.4.0 + + '@noble/hashes@1.4.0': {} + + '@solana-developers/helpers@2.4.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10)': + dependencies: + '@solana/spl-token': 0.4.8(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + bs58: 6.0.0 + dotenv: 16.4.5 + transitivePeerDependencies: + - bufferutil + - encoding + - fastestsmallesttextencoderdecoder + - typescript + - utf-8-validate + + '@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@solana/buffer-layout': 4.0.1 + '@solana/web3.js': 1.93.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + bigint-buffer: 1.1.5 + bignumber.js: 9.1.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + '@solana/buffer-layout@4.0.1': + dependencies: + buffer: 6.0.3 + + '@solana/codecs-core@2.0.0-preview.2': + dependencies: + '@solana/errors': 2.0.0-preview.2 + + '@solana/codecs-core@2.0.0-preview.4(typescript@4.9.5)': + dependencies: + '@solana/errors': 2.0.0-preview.4(typescript@4.9.5) + typescript: 4.9.5 + + '@solana/codecs-data-structures@2.0.0-preview.2': + dependencies: + '@solana/codecs-core': 2.0.0-preview.2 + '@solana/codecs-numbers': 2.0.0-preview.2 + '@solana/errors': 2.0.0-preview.2 + + '@solana/codecs-data-structures@2.0.0-preview.4(typescript@4.9.5)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-numbers': 2.0.0-preview.4(typescript@4.9.5) + '@solana/errors': 2.0.0-preview.4(typescript@4.9.5) + typescript: 4.9.5 + + '@solana/codecs-numbers@2.0.0-preview.2': + dependencies: + '@solana/codecs-core': 2.0.0-preview.2 + '@solana/errors': 2.0.0-preview.2 + + '@solana/codecs-numbers@2.0.0-preview.4(typescript@4.9.5)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.4(typescript@4.9.5) + '@solana/errors': 2.0.0-preview.4(typescript@4.9.5) + typescript: 4.9.5 + + '@solana/codecs-strings@2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.2 + '@solana/codecs-numbers': 2.0.0-preview.2 + '@solana/errors': 2.0.0-preview.2 + fastestsmallesttextencoderdecoder: 1.0.22 + + '@solana/codecs-strings@2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-numbers': 2.0.0-preview.4(typescript@4.9.5) + '@solana/errors': 2.0.0-preview.4(typescript@4.9.5) + fastestsmallesttextencoderdecoder: 1.0.22 + typescript: 4.9.5 + + '@solana/codecs@2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.2 + '@solana/codecs-data-structures': 2.0.0-preview.2 + '@solana/codecs-numbers': 2.0.0-preview.2 + '@solana/codecs-strings': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/options': 2.0.0-preview.2 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/codecs@2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-data-structures': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-numbers': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-strings': 2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + '@solana/options': 2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + typescript: 4.9.5 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/errors@2.0.0-preview.2': + dependencies: + chalk: 5.3.0 + commander: 12.1.0 + + '@solana/errors@2.0.0-preview.4(typescript@4.9.5)': + dependencies: + chalk: 5.3.0 + commander: 12.1.0 + typescript: 4.9.5 + + '@solana/options@2.0.0-preview.2': + dependencies: + '@solana/codecs-core': 2.0.0-preview.2 + '@solana/codecs-numbers': 2.0.0-preview.2 + + '@solana/options@2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)': + dependencies: + '@solana/codecs-core': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-data-structures': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-numbers': 2.0.0-preview.4(typescript@4.9.5) + '@solana/codecs-strings': 2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + '@solana/errors': 2.0.0-preview.4(typescript@4.9.5) + typescript: 4.9.5 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/spl-token-group@0.0.4(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/codecs': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/spl-type-length-value': 0.1.0 + '@solana/web3.js': 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/spl-token-group@0.0.5(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)': + dependencies: + '@solana/codecs': 2.0.0-preview.4(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + '@solana/spl-type-length-value': 0.1.0 + '@solana/web3.js': 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - typescript + + '@solana/spl-token-metadata@0.1.4(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)': + dependencies: + '@solana/codecs': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/spl-type-length-value': 0.1.0 + '@solana/web3.js': 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/spl-token@0.4.6(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': + dependencies: + '@solana/buffer-layout': 4.0.1 + '@solana/buffer-layout-utils': 0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/spl-token-group': 0.0.4(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/spl-token-metadata': 0.1.4(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/web3.js': 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + buffer: 6.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - fastestsmallesttextencoderdecoder + - utf-8-validate + + '@solana/spl-token@0.4.8(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5)(utf-8-validate@5.0.10)': + dependencies: + '@solana/buffer-layout': 4.0.1 + '@solana/buffer-layout-utils': 0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/spl-token-group': 0.0.5(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@4.9.5) + '@solana/spl-token-metadata': 0.1.4(@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22) + '@solana/web3.js': 1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + buffer: 6.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - fastestsmallesttextencoderdecoder + - typescript + - utf-8-validate + + '@solana/spl-type-length-value@0.1.0': + dependencies: + buffer: 6.0.3 + + '@solana/web3.js@1.93.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@babel/runtime': 7.24.7 + '@noble/curves': 1.4.0 + '@noble/hashes': 1.4.0 + '@solana/buffer-layout': 4.0.1 + agentkeepalive: 4.5.0 + bigint-buffer: 1.1.5 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.3 + fast-stable-stringify: 1.0.0 + jayson: 4.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + node-fetch: 2.7.0 + rpc-websockets: 9.0.1 + superstruct: 1.0.4 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + '@solana/web3.js@1.95.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@babel/runtime': 7.25.0 + '@noble/curves': 1.4.2 + '@noble/hashes': 1.4.0 + '@solana/buffer-layout': 4.0.1 + agentkeepalive: 4.5.0 + bigint-buffer: 1.1.5 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.3 + fast-stable-stringify: 1.0.0 + jayson: 4.1.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + node-fetch: 2.7.0 + rpc-websockets: 9.0.2 + superstruct: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + '@swc/helpers@0.5.11': + dependencies: + tslib: 2.6.3 + + '@types/bn.js@5.1.5': + dependencies: + '@types/node': 20.14.2 + + '@types/chai@4.3.16': {} + + '@types/connect@3.4.38': + dependencies: + '@types/node': 12.20.55 + + '@types/json5@0.0.29': + optional: true + + '@types/mocha@9.1.1': {} + + '@types/node@12.20.55': {} + + '@types/node@20.14.2': + dependencies: + undici-types: 5.26.5 + + '@types/uuid@8.3.4': {} + + '@types/ws@7.4.7': + dependencies: + '@types/node': 12.20.55 + + '@types/ws@8.5.10': + dependencies: + '@types/node': 20.14.2 + + '@ungap/promise-all-settled@1.1.2': {} + + JSONStream@1.3.5: + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + + agentkeepalive@4.5.0: + dependencies: + humanize-ms: 1.2.1 + + ansi-colors@4.1.1: {} + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + argparse@2.0.1: {} + + arrify@1.0.1: {} + + assertion-error@1.1.0: {} + + balanced-match@1.0.2: {} + + base-x@3.0.9: + dependencies: + safe-buffer: 5.2.1 + + base-x@5.0.0: {} + + base64-js@1.5.1: {} + + bigint-buffer@1.1.5: + dependencies: + bindings: 1.5.0 + + bignumber.js@9.1.2: {} + + binary-extensions@2.3.0: {} + + bindings@1.5.0: + dependencies: + file-uri-to-path: 1.0.0 + + bn.js@5.2.1: {} + + borsh@0.7.0: + dependencies: + bn.js: 5.2.1 + bs58: 4.0.1 + text-encoding-utf-8: 1.0.2 + + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browser-stdout@1.3.1: {} + + bs58@4.0.1: + dependencies: + base-x: 3.0.9 + + bs58@6.0.0: + dependencies: + base-x: 5.0.0 + + buffer-from@1.1.2: {} + + buffer-layout@1.2.2: {} + + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + bufferutil@4.0.8: + dependencies: + node-gyp-build: 4.8.1 + optional: true + + camelcase@6.3.0: {} + + chai@4.4.1: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.4 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.0.8 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.3.0: {} + + check-error@1.0.3: + dependencies: + get-func-name: 2.0.2 + + chokidar@3.5.3: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + commander@12.1.0: {} + + commander@2.20.3: {} + + concat-map@0.0.1: {} + + cross-fetch@3.1.8: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + + crypto-hash@1.3.0: {} + + debug@4.3.3(supports-color@8.1.1): + dependencies: + ms: 2.1.2 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + deep-eql@4.1.4: + dependencies: + type-detect: 4.0.8 + + delay@5.0.0: {} + + diff@3.5.0: {} + + diff@5.0.0: {} + + dot-case@3.0.4: + dependencies: + no-case: 3.0.4 + tslib: 2.6.3 + + dotenv@16.4.5: {} + + emoji-regex@8.0.0: {} + + es6-promise@4.2.8: {} + + es6-promisify@5.0.0: + dependencies: + es6-promise: 4.2.8 + + escalade@3.1.2: {} + + escape-string-regexp@4.0.0: {} + + eventemitter3@4.0.7: {} + + eventemitter3@5.0.1: {} + + eyes@0.1.8: {} + + fast-stable-stringify@1.0.0: {} + + fastestsmallesttextencoderdecoder@1.0.22: {} + + file-uri-to-path@1.0.0: {} + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat@5.0.2: {} + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + get-caller-file@2.0.5: {} + + get-func-name@2.0.2: {} + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob@7.2.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + growl@1.10.5: {} + + has-flag@4.0.0: {} + + he@1.2.0: {} + + humanize-ms@1.2.1: + dependencies: + ms: 2.1.3 + + ieee754@1.2.1: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + dependencies: + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + + isomorphic-ws@4.0.1(ws@7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + dependencies: + ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) + + jayson@4.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): + dependencies: + '@types/connect': 3.4.38 + '@types/node': 12.20.55 + '@types/ws': 7.4.7 + 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(ws@7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + json-stringify-safe: 5.0.1 + uuid: 8.3.2 + ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + jayson@4.1.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): + dependencies: + '@types/connect': 3.4.38 + '@types/node': 12.20.55 + '@types/ws': 7.4.7 + 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(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + json-stringify-safe: 5.0.1 + uuid: 8.3.2 + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + json-stringify-safe@5.0.1: {} + + json5@1.0.2: + dependencies: + minimist: 1.2.8 + optional: true + + jsonparse@1.3.1: {} + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + loupe@2.3.7: + dependencies: + get-func-name: 2.0.2 + + lower-case@2.0.2: + dependencies: + tslib: 2.6.3 + + make-error@1.3.6: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@4.2.1: + dependencies: + brace-expansion: 1.1.11 + + minimist@1.2.8: {} + + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + + mocha@9.2.2: + dependencies: + '@ungap/promise-all-settled': 1.1.2 + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.3 + debug: 4.3.3(supports-color@8.1.1) + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.2.0 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 4.2.1 + ms: 2.1.3 + nanoid: 3.3.1 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + which: 2.0.2 + workerpool: 6.2.0 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + + ms@2.1.2: {} + + ms@2.1.3: {} + + nanoid@3.3.1: {} + + no-case@3.0.4: + dependencies: + lower-case: 2.0.2 + tslib: 2.6.3 + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + node-gyp-build@4.8.1: + optional: true + + normalize-path@3.0.0: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + pako@2.1.0: {} + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + pathval@1.1.1: {} + + picomatch@2.3.1: {} + + prettier@2.8.8: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + + regenerator-runtime@0.14.1: {} + + require-directory@2.1.1: {} + + rpc-websockets@9.0.1: + dependencies: + '@swc/helpers': 0.5.11 + '@types/uuid': 8.3.4 + '@types/ws': 8.5.10 + buffer: 6.0.3 + eventemitter3: 5.0.1 + uuid: 8.3.2 + ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 + + rpc-websockets@9.0.2: + dependencies: + '@swc/helpers': 0.5.11 + '@types/uuid': 8.3.4 + '@types/ws': 8.5.10 + buffer: 6.0.3 + eventemitter3: 5.0.1 + uuid: 8.3.2 + ws: 8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.0: + dependencies: + randombytes: 2.1.0 + + snake-case@3.0.4: + dependencies: + dot-case: 3.0.4 + tslib: 2.6.3 + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-bom@3.0.0: + optional: true + + strip-json-comments@3.1.1: {} + + superstruct@0.15.5: {} + + superstruct@1.0.4: {} + + superstruct@2.0.2: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + text-encoding-utf-8@1.0.2: {} + + through@2.3.8: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + toml@3.0.0: {} + + tr46@0.0.3: {} + + ts-mocha@10.0.0(mocha@9.2.2): + dependencies: + mocha: 9.2.2 + ts-node: 7.0.1 + optionalDependencies: + tsconfig-paths: 3.15.0 + + ts-node@7.0.1: + dependencies: + arrify: 1.0.1 + buffer-from: 1.1.2 + diff: 3.5.0 + make-error: 1.3.6 + minimist: 1.2.8 + mkdirp: 0.5.6 + source-map-support: 0.5.21 + yn: 2.0.0 + + tsconfig-paths@3.15.0: + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.8 + strip-bom: 3.0.0 + optional: true + + tslib@2.6.3: {} + + type-detect@4.0.8: {} + + typescript@4.9.5: {} + + undici-types@5.26.5: {} + + utf-8-validate@5.0.10: + dependencies: + node-gyp-build: 4.8.1 + optional: true + + uuid@8.3.2: {} + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + workerpool@6.2.0: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrappy@1.0.2: {} + + ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 + + ws@7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 + + ws@8.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 + + y18n@5.0.8: {} + + yargs-parser@20.2.4: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.4 + + yn@2.0.0: {} + + yocto-queue@0.1.0: {} From 3de4c555b5b17a56d302a62865207699047f5834 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Mon, 29 Jul 2024 14:14:34 -0400 Subject: [PATCH 03/11] Add transfer_tokens() to replace copypasted code --- tokens/escrow/anchor/README.md | 1 + .../escrow/src/instructions/make_offer.rs | 27 +++++++------------ .../programs/escrow/src/instructions/mod.rs | 3 +++ .../escrow/src/instructions/shared.rs | 25 +++++++++++++++++ .../escrow/src/instructions/take_offer.rs | 25 +++++++---------- 5 files changed, 48 insertions(+), 33 deletions(-) create mode 100644 tokens/escrow/anchor/programs/escrow/src/instructions/shared.rs diff --git a/tokens/escrow/anchor/README.md b/tokens/escrow/anchor/README.md index 2eb74834f..e67de3059 100644 --- a/tokens/escrow/anchor/README.md +++ b/tokens/escrow/anchor/README.md @@ -25,6 +25,7 @@ This project is based on [Dean Little's Anchor Escrow,](https://github.com/deanm One of the challenges when teaching is avoiding ambiguity — names have to be carefully chosen to be clear and not possible to confuse with other times. - Custom instructions were replaced by `@solana-developers/helpers` for many tasks to reduce the file size. +- Shared functionality to transfer tokens is now in `instructions/shared.rs` - The upstream project has a custom file layout. We use the 'multiple files' Anchor layout. - Contexts are separate data structures from functions that use the contexts. There is no need for OO-like `impl` patterns here - there's no mutable state stored in the Context, and the 'methods' do not mutate that state. Besides, it's easier to type! - The name 'deposit' was being used in multiple contexts, and `deposit` can be tough because it's a verb and a noun: diff --git a/tokens/escrow/anchor/programs/escrow/src/instructions/make_offer.rs b/tokens/escrow/anchor/programs/escrow/src/instructions/make_offer.rs index 5d4c1e57b..1f3024b3d 100644 --- a/tokens/escrow/anchor/programs/escrow/src/instructions/make_offer.rs +++ b/tokens/escrow/anchor/programs/escrow/src/instructions/make_offer.rs @@ -2,11 +2,13 @@ use anchor_lang::prelude::*; use anchor_spl::{ associated_token::AssociatedToken, - token_interface::{transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked}, + token_interface::{Mint, TokenAccount, TokenInterface}, }; use crate::{Offer, ANCHOR_DISCRIMINATOR}; +use super::transfer_tokens; + // See https://www.anchor-lang.com/docs/account-constraints#instruction-attribute #[derive(Accounts)] #[instruction(id: u64)] @@ -56,22 +58,13 @@ pub fn send_offered_tokens_to_vault( context: &Context, token_a_offered_amount: u64, ) -> Result<()> { - let transfer_accounts = TransferChecked { - from: context.accounts.maker_token_account_a.to_account_info(), - mint: context.accounts.token_mint_a.to_account_info(), - to: context.accounts.vault.to_account_info(), - authority: context.accounts.maker.to_account_info(), - }; - - let cpi_context = CpiContext::new( - context.accounts.token_program.to_account_info(), - transfer_accounts, - ); - - transfer_checked( - cpi_context, - token_a_offered_amount, - context.accounts.token_mint_a.decimals, + transfer_tokens( + &context.accounts.maker_token_account_a, + &context.accounts.vault, + &token_a_offered_amount, + &context.accounts.token_mint_a, + &context.accounts.maker, + &context.accounts.token_program, ) } diff --git a/tokens/escrow/anchor/programs/escrow/src/instructions/mod.rs b/tokens/escrow/anchor/programs/escrow/src/instructions/mod.rs index bac9a6549..cf1dd986b 100644 --- a/tokens/escrow/anchor/programs/escrow/src/instructions/mod.rs +++ b/tokens/escrow/anchor/programs/escrow/src/instructions/mod.rs @@ -3,3 +3,6 @@ pub use make_offer::*; pub mod take_offer; pub use take_offer::*; + +pub mod shared; +pub use shared::*; diff --git a/tokens/escrow/anchor/programs/escrow/src/instructions/shared.rs b/tokens/escrow/anchor/programs/escrow/src/instructions/shared.rs new file mode 100644 index 000000000..3152521d9 --- /dev/null +++ b/tokens/escrow/anchor/programs/escrow/src/instructions/shared.rs @@ -0,0 +1,25 @@ +use anchor_lang::prelude::*; + +use anchor_spl::token_interface::{ + transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked, +}; + +pub fn transfer_tokens<'info>( + from: &InterfaceAccount<'info, TokenAccount>, + to: &InterfaceAccount<'info, TokenAccount>, + amount: &u64, + mint: &InterfaceAccount<'info, Mint>, + authority: &Signer<'info>, + token_program: &Interface<'info, TokenInterface>, +) -> Result<()> { + let transfer_accounts = TransferChecked { + from: from.to_account_info(), + mint: mint.to_account_info(), + to: to.to_account_info(), + authority: authority.to_account_info(), + }; + + let cpi_context = CpiContext::new(token_program.to_account_info(), transfer_accounts); + + transfer_checked(cpi_context, *amount, mint.decimals) +} diff --git a/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs b/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs index 9243e76e5..c065b8d5a 100644 --- a/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs +++ b/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs @@ -10,6 +10,8 @@ use anchor_spl::{ use crate::Offer; +use super::transfer_tokens; + #[derive(Accounts)] pub struct TakeOffer<'info> { #[account(mut)] @@ -73,22 +75,13 @@ pub struct TakeOffer<'info> { } pub fn send_wanted_tokens_to_maker(ctx: &Context) -> Result<()> { - let transfer_accounts = TransferChecked { - from: ctx.accounts.taker_token_account_b.to_account_info(), - mint: ctx.accounts.token_mint_b.to_account_info(), - to: ctx.accounts.maker_token_account_b.to_account_info(), - authority: ctx.accounts.taker.to_account_info(), - }; - - let cpi_ctx = CpiContext::new( - ctx.accounts.token_program.to_account_info(), - transfer_accounts, - ); - - transfer_checked( - cpi_ctx, - ctx.accounts.offer.token_b_wanted_amount, - ctx.accounts.token_mint_b.decimals, + transfer_tokens( + &ctx.accounts.taker_token_account_b, + &ctx.accounts.maker_token_account_b, + &ctx.accounts.offer.token_b_wanted_amount, + &ctx.accounts.token_mint_b, + &ctx.accounts.taker, + &ctx.accounts.token_program, ) } From 6e0d16909980b893b635d0168738226d1c23cde8 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Tue, 30 Jul 2024 10:34:58 -0400 Subject: [PATCH 04/11] Split up sign_seeds to be less ugly --- .../anchor/programs/escrow/src/instructions/take_offer.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs b/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs index c065b8d5a..66d591f0a 100644 --- a/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs +++ b/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs @@ -86,12 +86,13 @@ pub fn send_wanted_tokens_to_maker(ctx: &Context) -> Result<()> { } pub fn withdraw_and_close_vault(ctx: Context) -> Result<()> { - let signer_seeds: [&[&[u8]]; 1] = [&[ + let seeds = &[ b"offer", ctx.accounts.maker.to_account_info().key.as_ref(), &ctx.accounts.offer.id.to_le_bytes()[..], &[ctx.accounts.offer.bump], - ]]; + ]; + let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; let accounts = TransferChecked { from: ctx.accounts.vault.to_account_info(), From dbb6eadc7975b327295338a64373c687c43f4d77 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Tue, 30 Jul 2024 10:48:32 -0400 Subject: [PATCH 05/11] Avoid premature optimisation and just move make and take into their respective tests --- tokens/escrow/anchor/tests/escrow.ts | 116 ++++++++++++--------------- 1 file changed, 53 insertions(+), 63 deletions(-) diff --git a/tokens/escrow/anchor/tests/escrow.ts b/tokens/escrow/anchor/tests/escrow.ts index 2232c5dce..e8b0c56b1 100644 --- a/tokens/escrow/anchor/tests/escrow.ts +++ b/tokens/escrow/anchor/tests/escrow.ts @@ -45,67 +45,6 @@ describe('escrow', async () => { const tokenAOfferedAmount = new BN(1_000_000); const tokenBWantedAmount = new BN(1_000_000); - // We'll call this function from multiple tests, so let's seperate it out - const make = async () => { - // Pick a random ID for the offer we'll make - const offerId = getRandomBigNumber(); - - // Then determine the account addresses we'll use for the offer and the vault - const offer = PublicKey.findProgramAddressSync( - [Buffer.from('offer'), accounts.maker.toBuffer(), offerId.toArrayLike(Buffer, 'le', 8)], - program.programId, - )[0]; - - const vault = getAssociatedTokenAddressSync(accounts.tokenMintA, offer, true, TOKEN_PROGRAM); - - accounts.offer = offer; - accounts.vault = vault; - - const transactionSignature = await program.methods - .makeOffer(offerId, tokenAOfferedAmount, tokenBWantedAmount) - .accounts({ ...accounts }) - .signers([alice]) - .rpc(); - - await confirmTransaction(connection, transactionSignature); - - // Check our vault contains the tokens offered - const vaultBalanceResponse = await connection.getTokenAccountBalance(vault); - const vaultBalance = new BN(vaultBalanceResponse.value.amount); - assert(vaultBalance.eq(tokenAOfferedAmount)); - - // Check our Offer account contains the correct data - const offerAccount = await program.account.offer.fetch(offer); - - assert(offerAccount.maker.equals(alice.publicKey)); - assert(offerAccount.tokenMintA.equals(accounts.tokenMintA)); - assert(offerAccount.tokenMintB.equals(accounts.tokenMintB)); - assert(offerAccount.tokenBWantedAmount.eq(tokenBWantedAmount)); - }; - - // We'll call this function from multiple tests, so let's seperate it out - const take = async () => { - const transactionSignature = await program.methods - .takeOffer() - .accounts({ ...accounts }) - .signers([bob]) - .rpc(); - - await confirmTransaction(connection, transactionSignature); - - // Check the offered tokens are now in Bob's account - // (note: there is no before balance as Bob didn't have any offered tokens before the transaction) - const bobTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.takerTokenAccountA); - const bobTokenAccountBalanceAfter = new BN(bobTokenAccountBalanceAfterResponse.value.amount); - assert(bobTokenAccountBalanceAfter.eq(tokenAOfferedAmount)); - - // Check the wanted tokens are now in Alice's account - // (note: there is no before balance as Alice didn't have any wanted tokens before the transaction) - const aliceTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.makerTokenAccountB); - const aliceTokenAccountBalanceAfter = new BN(aliceTokenAccountBalanceAfterResponse.value.amount); - assert(aliceTokenAccountBalanceAfter.eq(tokenBWantedAmount)); - }; - before('Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users', async () => { const usersMintsAndTokenAccounts = await createAccountsMintsAndTokenAccounts( [ @@ -157,10 +96,61 @@ describe('escrow', async () => { }); it('Puts the tokens Alice offers into the vault when Alice makes an offer', async () => { - await make(); + // Pick a random ID for the offer we'll make + const offerId = getRandomBigNumber(); + + // Then determine the account addresses we'll use for the offer and the vault + const offer = PublicKey.findProgramAddressSync( + [Buffer.from('offer'), accounts.maker.toBuffer(), offerId.toArrayLike(Buffer, 'le', 8)], + program.programId, + )[0]; + + const vault = getAssociatedTokenAddressSync(accounts.tokenMintA, offer, true, TOKEN_PROGRAM); + + accounts.offer = offer; + accounts.vault = vault; + + const transactionSignature = await program.methods + .makeOffer(offerId, tokenAOfferedAmount, tokenBWantedAmount) + .accounts({ ...accounts }) + .signers([alice]) + .rpc(); + + await confirmTransaction(connection, transactionSignature); + + // Check our vault contains the tokens offered + const vaultBalanceResponse = await connection.getTokenAccountBalance(vault); + const vaultBalance = new BN(vaultBalanceResponse.value.amount); + assert(vaultBalance.eq(tokenAOfferedAmount)); + + // Check our Offer account contains the correct data + const offerAccount = await program.account.offer.fetch(offer); + + assert(offerAccount.maker.equals(alice.publicKey)); + assert(offerAccount.tokenMintA.equals(accounts.tokenMintA)); + assert(offerAccount.tokenMintB.equals(accounts.tokenMintB)); + assert(offerAccount.tokenBWantedAmount.eq(tokenBWantedAmount)); }).slow(60 * SECONDS); it("Puts the tokens from the vault into Bob's account, and gives Alice Bob's tokens, when Bob takes an offer", async () => { - await take(); + const transactionSignature = await program.methods + .takeOffer() + .accounts({ ...accounts }) + .signers([bob]) + .rpc(); + + await confirmTransaction(connection, transactionSignature); + + // Check the offered tokens are now in Bob's account + // (note: there is no before balance as Bob didn't have any offered tokens before the transaction) + const bobTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.takerTokenAccountA); + const bobTokenAccountBalanceAfter = new BN(bobTokenAccountBalanceAfterResponse.value.amount); + assert(bobTokenAccountBalanceAfter.eq(tokenAOfferedAmount)); + + // Check the wanted tokens are now in Alice's account + // (note: there is no before balance as Alice didn't have any wanted tokens before the transaction) + const aliceTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.makerTokenAccountB); + const aliceTokenAccountBalanceAfter = new BN(aliceTokenAccountBalanceAfterResponse.value.amount); + assert(aliceTokenAccountBalanceAfter.eq(tokenBWantedAmount)); }).slow(60 * SECONDS); }); From bab7dd947f09f591bc8d53d433a2fc9d38bee310 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Tue, 30 Jul 2024 10:58:29 -0400 Subject: [PATCH 06/11] Format, no changes --- tokens/escrow/anchor/tests/escrow.ts | 166 ++++++++++++++++----------- 1 file changed, 97 insertions(+), 69 deletions(-) diff --git a/tokens/escrow/anchor/tests/escrow.ts b/tokens/escrow/anchor/tests/escrow.ts index e8b0c56b1..3fdbced02 100644 --- a/tokens/escrow/anchor/tests/escrow.ts +++ b/tokens/escrow/anchor/tests/escrow.ts @@ -1,15 +1,24 @@ -import { randomBytes } from 'node:crypto'; -import * as anchor from '@coral-xyz/anchor'; -import { BN, type Program } from '@coral-xyz/anchor'; -import { TOKEN_2022_PROGRAM_ID, type TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token'; -import { LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'; -import { assert } from 'chai'; -import type { Escrow } from '../target/types/escrow'; - -import { confirmTransaction, createAccountsMintsAndTokenAccounts, makeKeypairs } from '@solana-developers/helpers'; +import { randomBytes } from "node:crypto"; +import * as anchor from "@coral-xyz/anchor"; +import { BN, type Program } from "@coral-xyz/anchor"; +import { + TOKEN_2022_PROGRAM_ID, + type TOKEN_PROGRAM_ID, + getAssociatedTokenAddressSync, +} from "@solana/spl-token"; +import { LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js"; +import { assert } from "chai"; +import type { Escrow } from "../target/types/escrow"; + +import { + confirmTransaction, + createAccountsMintsAndTokenAccounts, + makeKeypairs, +} from "@solana-developers/helpers"; // Work on both Token Program and new Token Extensions Program -const TOKEN_PROGRAM: typeof TOKEN_2022_PROGRAM_ID | typeof TOKEN_PROGRAM_ID = TOKEN_2022_PROGRAM_ID; +const TOKEN_PROGRAM: typeof TOKEN_2022_PROGRAM_ID | typeof TOKEN_PROGRAM_ID = + TOKEN_2022_PROGRAM_ID; const SECONDS = 1000; @@ -17,7 +26,7 @@ const getRandomBigNumber = (size = 8) => { return new BN(randomBytes(size)); }; -describe('escrow', async () => { +describe("escrow", async () => { // Use the cluster and the keypair from Anchor.toml const provider = anchor.AnchorProvider.env(); anchor.setProvider(provider); @@ -45,67 +54,80 @@ describe('escrow', async () => { const tokenAOfferedAmount = new BN(1_000_000); const tokenBWantedAmount = new BN(1_000_000); - before('Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users', async () => { - const usersMintsAndTokenAccounts = await createAccountsMintsAndTokenAccounts( - [ - // Alice's token balances - [ - // 1_000_000_000 of token A - 1_000_000_000, - // 0 of token B - 0, - ], - // Bob's token balances - [ - // 0 of token A - 0, - // 1_000_000_000 of token B - 1_000_000_000, - ], - ], - 1 * LAMPORTS_PER_SOL, - connection, - payer, - ); - - const users = usersMintsAndTokenAccounts.users; - alice = users[0]; - bob = users[1]; - - const mints = usersMintsAndTokenAccounts.mints; - tokenMintA = mints[0]; - tokenMintB = mints[1]; - - const tokenAccounts = usersMintsAndTokenAccounts.tokenAccounts; - - const aliceTokenAccountA = tokenAccounts[0][0]; - const aliceTokenAccountB = tokenAccounts[0][1]; - - const bobTokenAccountA = tokenAccounts[1][0]; - const bobTokenAccountB = tokenAccounts[1][1]; - - // Save the accounts for later use - accounts.maker = alice.publicKey; - accounts.taker = bob.publicKey; - accounts.tokenMintA = tokenMintA.publicKey; - accounts.makerTokenAccountA = aliceTokenAccountA; - accounts.takerTokenAccountA = bobTokenAccountA; - accounts.tokenMintB = tokenMintB.publicKey; - accounts.makerTokenAccountB = aliceTokenAccountB; - accounts.takerTokenAccountB = bobTokenAccountB; - }); - - it('Puts the tokens Alice offers into the vault when Alice makes an offer', async () => { + before( + "Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users", + async () => { + const usersMintsAndTokenAccounts = + await createAccountsMintsAndTokenAccounts( + [ + // Alice's token balances + [ + // 1_000_000_000 of token A + 1_000_000_000, + // 0 of token B + 0, + ], + // Bob's token balances + [ + // 0 of token A + 0, + // 1_000_000_000 of token B + 1_000_000_000, + ], + ], + 1 * LAMPORTS_PER_SOL, + connection, + payer + ); + + const users = usersMintsAndTokenAccounts.users; + alice = users[0]; + bob = users[1]; + + const mints = usersMintsAndTokenAccounts.mints; + tokenMintA = mints[0]; + tokenMintB = mints[1]; + + const tokenAccounts = usersMintsAndTokenAccounts.tokenAccounts; + + const aliceTokenAccountA = tokenAccounts[0][0]; + const aliceTokenAccountB = tokenAccounts[0][1]; + + const bobTokenAccountA = tokenAccounts[1][0]; + const bobTokenAccountB = tokenAccounts[1][1]; + + // Save the accounts for later use + accounts.maker = alice.publicKey; + accounts.taker = bob.publicKey; + accounts.tokenMintA = tokenMintA.publicKey; + accounts.makerTokenAccountA = aliceTokenAccountA; + accounts.takerTokenAccountA = bobTokenAccountA; + accounts.tokenMintB = tokenMintB.publicKey; + accounts.makerTokenAccountB = aliceTokenAccountB; + accounts.takerTokenAccountB = bobTokenAccountB; + } + ); + + it("Puts the tokens Alice offers into the vault when Alice makes an offer", async () => { // Pick a random ID for the offer we'll make const offerId = getRandomBigNumber(); // Then determine the account addresses we'll use for the offer and the vault const offer = PublicKey.findProgramAddressSync( - [Buffer.from('offer'), accounts.maker.toBuffer(), offerId.toArrayLike(Buffer, 'le', 8)], - program.programId, + [ + Buffer.from("offer"), + accounts.maker.toBuffer(), + offerId.toArrayLike(Buffer, "le", 8), + ], + program.programId )[0]; - const vault = getAssociatedTokenAddressSync(accounts.tokenMintA, offer, true, TOKEN_PROGRAM); + const vault = getAssociatedTokenAddressSync( + accounts.tokenMintA, + offer, + true, + TOKEN_PROGRAM + ); accounts.offer = offer; accounts.vault = vault; @@ -143,14 +165,20 @@ describe('escrow', async () => { // Check the offered tokens are now in Bob's account // (note: there is no before balance as Bob didn't have any offered tokens before the transaction) - const bobTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.takerTokenAccountA); - const bobTokenAccountBalanceAfter = new BN(bobTokenAccountBalanceAfterResponse.value.amount); + const bobTokenAccountBalanceAfterResponse = + await connection.getTokenAccountBalance(accounts.takerTokenAccountA); + const bobTokenAccountBalanceAfter = new BN( + bobTokenAccountBalanceAfterResponse.value.amount + ); assert(bobTokenAccountBalanceAfter.eq(tokenAOfferedAmount)); // Check the wanted tokens are now in Alice's account // (note: there is no before balance as Alice didn't have any wanted tokens before the transaction) - const aliceTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.makerTokenAccountB); - const aliceTokenAccountBalanceAfter = new BN(aliceTokenAccountBalanceAfterResponse.value.amount); + const aliceTokenAccountBalanceAfterResponse = + await connection.getTokenAccountBalance(accounts.makerTokenAccountB); + const aliceTokenAccountBalanceAfter = new BN( + aliceTokenAccountBalanceAfterResponse.value.amount + ); assert(aliceTokenAccountBalanceAfter.eq(tokenBWantedAmount)); }).slow(60 * SECONDS); }); From 6211c177ca56cacaf8fdccf2c0a7c39ceffbf015 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Fri, 2 Aug 2024 17:47:10 -0400 Subject: [PATCH 07/11] Make a variable for mocha slow test threshhold --- tokens/escrow/anchor/tests/escrow.ts | 175 ++++++++++++--------------- 1 file changed, 76 insertions(+), 99 deletions(-) diff --git a/tokens/escrow/anchor/tests/escrow.ts b/tokens/escrow/anchor/tests/escrow.ts index 3fdbced02..2a52412e8 100644 --- a/tokens/escrow/anchor/tests/escrow.ts +++ b/tokens/escrow/anchor/tests/escrow.ts @@ -1,32 +1,28 @@ -import { randomBytes } from "node:crypto"; -import * as anchor from "@coral-xyz/anchor"; -import { BN, type Program } from "@coral-xyz/anchor"; -import { - TOKEN_2022_PROGRAM_ID, - type TOKEN_PROGRAM_ID, - getAssociatedTokenAddressSync, -} from "@solana/spl-token"; -import { LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js"; -import { assert } from "chai"; -import type { Escrow } from "../target/types/escrow"; - -import { - confirmTransaction, - createAccountsMintsAndTokenAccounts, - makeKeypairs, -} from "@solana-developers/helpers"; +import { randomBytes } from 'node:crypto'; +import * as anchor from '@coral-xyz/anchor'; +import { BN, type Program } from '@coral-xyz/anchor'; +import { TOKEN_2022_PROGRAM_ID, type TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token'; +import { LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'; +import { assert } from 'chai'; +import type { Escrow } from '../target/types/escrow'; + +import { confirmTransaction, createAccountsMintsAndTokenAccounts, makeKeypairs } from '@solana-developers/helpers'; // Work on both Token Program and new Token Extensions Program -const TOKEN_PROGRAM: typeof TOKEN_2022_PROGRAM_ID | typeof TOKEN_PROGRAM_ID = - TOKEN_2022_PROGRAM_ID; +const TOKEN_PROGRAM: typeof TOKEN_2022_PROGRAM_ID | typeof TOKEN_PROGRAM_ID = TOKEN_2022_PROGRAM_ID; const SECONDS = 1000; +// Tests must complete within half this time otherwise +// they are marked as slow. Since Anchor involves a little +// network IO, these tests usually take about 15 seconds. +const ANCHOR_SLOW_TEST_THRESHOLD = 40 * SECONDS; + const getRandomBigNumber = (size = 8) => { return new BN(randomBytes(size)); }; -describe("escrow", async () => { +describe('escrow', async () => { // Use the cluster and the keypair from Anchor.toml const provider = anchor.AnchorProvider.env(); anchor.setProvider(provider); @@ -54,80 +50,67 @@ describe("escrow", async () => { const tokenAOfferedAmount = new BN(1_000_000); const tokenBWantedAmount = new BN(1_000_000); - before( - "Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users", - async () => { - const usersMintsAndTokenAccounts = - await createAccountsMintsAndTokenAccounts( - [ - // Alice's token balances - [ - // 1_000_000_000 of token A - 1_000_000_000, - // 0 of token B - 0, - ], - // Bob's token balances - [ - // 0 of token A - 0, - // 1_000_000_000 of token B - 1_000_000_000, - ], - ], - 1 * LAMPORTS_PER_SOL, - connection, - payer - ); - - const users = usersMintsAndTokenAccounts.users; - alice = users[0]; - bob = users[1]; - - const mints = usersMintsAndTokenAccounts.mints; - tokenMintA = mints[0]; - tokenMintB = mints[1]; - - const tokenAccounts = usersMintsAndTokenAccounts.tokenAccounts; - - const aliceTokenAccountA = tokenAccounts[0][0]; - const aliceTokenAccountB = tokenAccounts[0][1]; - - const bobTokenAccountA = tokenAccounts[1][0]; - const bobTokenAccountB = tokenAccounts[1][1]; - - // Save the accounts for later use - accounts.maker = alice.publicKey; - accounts.taker = bob.publicKey; - accounts.tokenMintA = tokenMintA.publicKey; - accounts.makerTokenAccountA = aliceTokenAccountA; - accounts.takerTokenAccountA = bobTokenAccountA; - accounts.tokenMintB = tokenMintB.publicKey; - accounts.makerTokenAccountB = aliceTokenAccountB; - accounts.takerTokenAccountB = bobTokenAccountB; - } - ); - - it("Puts the tokens Alice offers into the vault when Alice makes an offer", async () => { + before('Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users', async () => { + const usersMintsAndTokenAccounts = await createAccountsMintsAndTokenAccounts( + [ + // Alice's token balances + [ + // 1_000_000_000 of token A + 1_000_000_000, + // 0 of token B + 0, + ], + // Bob's token balances + [ + // 0 of token A + 0, + // 1_000_000_000 of token B + 1_000_000_000, + ], + ], + 1 * LAMPORTS_PER_SOL, + connection, + payer, + ); + + const users = usersMintsAndTokenAccounts.users; + alice = users[0]; + bob = users[1]; + + const mints = usersMintsAndTokenAccounts.mints; + tokenMintA = mints[0]; + tokenMintB = mints[1]; + + const tokenAccounts = usersMintsAndTokenAccounts.tokenAccounts; + + const aliceTokenAccountA = tokenAccounts[0][0]; + const aliceTokenAccountB = tokenAccounts[0][1]; + + const bobTokenAccountA = tokenAccounts[1][0]; + const bobTokenAccountB = tokenAccounts[1][1]; + + // Save the accounts for later use + accounts.maker = alice.publicKey; + accounts.taker = bob.publicKey; + accounts.tokenMintA = tokenMintA.publicKey; + accounts.makerTokenAccountA = aliceTokenAccountA; + accounts.takerTokenAccountA = bobTokenAccountA; + accounts.tokenMintB = tokenMintB.publicKey; + accounts.makerTokenAccountB = aliceTokenAccountB; + accounts.takerTokenAccountB = bobTokenAccountB; + }); + + it('Puts the tokens Alice offers into the vault when Alice makes an offer', async () => { // Pick a random ID for the offer we'll make const offerId = getRandomBigNumber(); // Then determine the account addresses we'll use for the offer and the vault const offer = PublicKey.findProgramAddressSync( - [ - Buffer.from("offer"), - accounts.maker.toBuffer(), - offerId.toArrayLike(Buffer, "le", 8), - ], - program.programId + [Buffer.from('offer'), accounts.maker.toBuffer(), offerId.toArrayLike(Buffer, 'le', 8)], + program.programId, )[0]; - const vault = getAssociatedTokenAddressSync( - accounts.tokenMintA, - offer, - true, - TOKEN_PROGRAM - ); + const vault = getAssociatedTokenAddressSync(accounts.tokenMintA, offer, true, TOKEN_PROGRAM); accounts.offer = offer; accounts.vault = vault; @@ -152,7 +135,7 @@ describe("escrow", async () => { assert(offerAccount.tokenMintA.equals(accounts.tokenMintA)); assert(offerAccount.tokenMintB.equals(accounts.tokenMintB)); assert(offerAccount.tokenBWantedAmount.eq(tokenBWantedAmount)); - }).slow(60 * SECONDS); + }).slow(ANCHOR_SLOW_TEST_THRESHOLD); it("Puts the tokens from the vault into Bob's account, and gives Alice Bob's tokens, when Bob takes an offer", async () => { const transactionSignature = await program.methods @@ -165,20 +148,14 @@ describe("escrow", async () => { // Check the offered tokens are now in Bob's account // (note: there is no before balance as Bob didn't have any offered tokens before the transaction) - const bobTokenAccountBalanceAfterResponse = - await connection.getTokenAccountBalance(accounts.takerTokenAccountA); - const bobTokenAccountBalanceAfter = new BN( - bobTokenAccountBalanceAfterResponse.value.amount - ); + const bobTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.takerTokenAccountA); + const bobTokenAccountBalanceAfter = new BN(bobTokenAccountBalanceAfterResponse.value.amount); assert(bobTokenAccountBalanceAfter.eq(tokenAOfferedAmount)); // Check the wanted tokens are now in Alice's account // (note: there is no before balance as Alice didn't have any wanted tokens before the transaction) - const aliceTokenAccountBalanceAfterResponse = - await connection.getTokenAccountBalance(accounts.makerTokenAccountB); - const aliceTokenAccountBalanceAfter = new BN( - aliceTokenAccountBalanceAfterResponse.value.amount - ); + const aliceTokenAccountBalanceAfterResponse = await connection.getTokenAccountBalance(accounts.makerTokenAccountB); + const aliceTokenAccountBalanceAfter = new BN(aliceTokenAccountBalanceAfterResponse.value.amount); assert(aliceTokenAccountBalanceAfter.eq(tokenBWantedAmount)); - }).slow(60 * SECONDS); + }).slow(ANCHOR_SLOW_TEST_THRESHOLD); }); From b3d06887a0ba404bb464e22cd6e4911bd18a6d3b Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Tue, 6 Aug 2024 11:52:38 -0400 Subject: [PATCH 08/11] Make less ugly --- .../anchor/programs/escrow/src/instructions/take_offer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs b/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs index 66d591f0a..a3fecb7f0 100644 --- a/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs +++ b/tokens/escrow/anchor/programs/escrow/src/instructions/take_offer.rs @@ -92,7 +92,7 @@ pub fn withdraw_and_close_vault(ctx: Context) -> Result<()> { &ctx.accounts.offer.id.to_le_bytes()[..], &[ctx.accounts.offer.bump], ]; - let signer_seeds: [&[&[u8]]; 1] = [&seeds[..]]; + let signer_seeds = [&seeds[..]]; let accounts = TransferChecked { from: ctx.accounts.vault.to_account_info(), From 46b84cf89ec28ac1dfa73adccfac9172b0de5997 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Thu, 8 Aug 2024 19:50:32 -0400 Subject: [PATCH 09/11] Neaten --- basics/favorites/anchor/programs/favorites/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basics/favorites/anchor/programs/favorites/src/lib.rs b/basics/favorites/anchor/programs/favorites/src/lib.rs index 8e740c6de..e690166a5 100644 --- a/basics/favorites/anchor/programs/favorites/src/lib.rs +++ b/basics/favorites/anchor/programs/favorites/src/lib.rs @@ -13,8 +13,8 @@ pub mod favorites { // Our instruction handler! It sets the user's favorite number and color pub fn set_favorites(context: Context, number: u64, color: String, hobbies: Vec) -> Result<()> { - let user_public_key = context.accounts.user.key(); msg!("Greetings from {}", context.program_id); + let user_public_key = context.accounts.user.key(); msg!( "User {user_public_key}'s favorite number is {number}, favorite color is: {color}, and their hobbies are {hobbies:?}", ); @@ -53,7 +53,8 @@ pub struct SetFavorites<'info> { payer = user, space = ANCHOR_DISCRIMINATOR_SIZE + Favorites::INIT_SPACE, seeds=[b"favorites", user.key().as_ref()], - bump)] + bump + )] pub favorites: Account<'info, Favorites>, pub system_program: Program<'info, System>, From 79570a6b940e12fc783f19eb05c067df5534f4f7 Mon Sep 17 00:00:00 2001 From: Mike MacCana Date: Thu, 8 Aug 2024 19:51:42 -0400 Subject: [PATCH 10/11] Log signature --- basics/favorites/anchor/tests/favorites.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basics/favorites/anchor/tests/favorites.ts b/basics/favorites/anchor/tests/favorites.ts index c22405f14..9837c3c54 100644 --- a/basics/favorites/anchor/tests/favorites.ts +++ b/basics/favorites/anchor/tests/favorites.ts @@ -54,7 +54,9 @@ describe('Favorites', () => { it('Updates the favorites', async () => { const newFavoriteHobbies = ['skiing', 'skydiving', 'biking', 'swimming']; try { - await program.methods.setFavorites(favoriteNumber, favoriteColor, newFavoriteHobbies).signers([user]).rpc(); + const signature = await program.methods.setFavorites(favoriteNumber, favoriteColor, newFavoriteHobbies).signers([user]).rpc(); + + console.log(`Transaction signature: ${signature}`); } catch (error) { console.error((error as Error).message); const customErrorMessage = getCustomErrorMessage(systemProgramErrors, error); From 6c9280882c0a755155d6eb52e368e3409b358123 Mon Sep 17 00:00:00 2001 From: John <75003086+ZYJLiu@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:31:33 -0500 Subject: [PATCH 11/11] add comments in test to provide context for accounts --- tokens/escrow/anchor/tests/escrow.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tokens/escrow/anchor/tests/escrow.ts b/tokens/escrow/anchor/tests/escrow.ts index 2a52412e8..0c5a5c0bb 100644 --- a/tokens/escrow/anchor/tests/escrow.ts +++ b/tokens/escrow/anchor/tests/escrow.ts @@ -73,19 +73,27 @@ describe('escrow', async () => { payer, ); + // Alice will be the maker (creator) of the offer + // Bob will be the taker (acceptor) of the offer const users = usersMintsAndTokenAccounts.users; alice = users[0]; bob = users[1]; + // tokenMintA represents the token Alice is offering + // tokenMintB represents the token Alice wants in return const mints = usersMintsAndTokenAccounts.mints; tokenMintA = mints[0]; tokenMintB = mints[1]; const tokenAccounts = usersMintsAndTokenAccounts.tokenAccounts; + // aliceTokenAccountA is Alice's account for tokenA (the token she's offering) + // aliceTokenAccountB is Alice's account for tokenB (the token she wants) const aliceTokenAccountA = tokenAccounts[0][0]; const aliceTokenAccountB = tokenAccounts[0][1]; + // bobTokenAccountA is Bob's account for tokenA (the token Alice is offering) + // bobTokenAccountB is Bob's account for tokenB (the token Alice wants) const bobTokenAccountA = tokenAccounts[1][0]; const bobTokenAccountB = tokenAccounts[1][1];