From 997c610ec998213d9dd9b1d33a393a3c329c8fe3 Mon Sep 17 00:00:00 2001 From: tjs Date: Fri, 24 Jun 2022 16:41:04 +0200 Subject: [PATCH] use jupiter swap and remove orca integration code --- package.json | 3 +- ts/client/src/client.ts | 158 ++++++--- ts/client/src/integrations/orca/index.ts | 200 ----------- ts/client/src/integrations/orca/tokens.ts | 41 --- ts/client/src/integrations/serum/index.ts | 40 --- yarn.lock | 412 ++++++++++++++++++++-- 6 files changed, 505 insertions(+), 349 deletions(-) delete mode 100644 ts/client/src/integrations/orca/index.ts delete mode 100644 ts/client/src/integrations/orca/tokens.ts delete mode 100644 ts/client/src/integrations/serum/index.ts diff --git a/package.json b/package.json index b67a14f63..fe234cce5 100644 --- a/package.json +++ b/package.json @@ -55,10 +55,11 @@ "trailingComma": "all" }, "dependencies": { + "@jup-ag/core": "^1.0.0-beta.27", "@project-serum/anchor": "^0.24.2", "@project-serum/serum": "^0.13.65", "@pythnetwork/client": "^2.7.0", - "@solana/spl-token": "^0.2.0", + "@solana/spl-token": "^0.1.8", "big.js": "^6.1.1", "bs58": "^5.0.0" }, diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index 9f8a1d560..149db0557 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -1,3 +1,4 @@ +import { Jupiter } from '@jup-ag/core'; import { AnchorProvider, BN, Program, Provider } from '@project-serum/anchor'; import { getFeeRates, getFeeTier } from '@project-serum/serum'; import { Order } from '@project-serum/serum/lib/market'; @@ -9,8 +10,7 @@ import { import { parsePriceData } from '@pythnetwork/client'; import { ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - createTransferInstruction, + Token, TOKEN_PROGRAM_ID, } from '@solana/spl-token'; import { @@ -23,6 +23,7 @@ import { Signer, SystemProgram, SYSVAR_RENT_PUBKEY, + Transaction, TransactionInstruction, TransactionSignature, } from '@solana/web3.js'; @@ -41,10 +42,6 @@ import { } from './accounts/serum3'; import { SERUM3_PROGRAM_ID } from './constants'; import { Id } from './ids'; -// import { -// buildOrcaInstruction, -// ORCA_TOKEN_SWAP_ID_DEVNET, -// } from './integrations/orca/index'; import { IDL, MangoV4 } from './mango_v4'; import { FlashLoanWithdraw } from './types'; import { @@ -1100,22 +1097,20 @@ export class MangoClient { .rpc(); } - /// margin trade (orca) - public async marginTrade({ group, mangoAccount, inputToken, amountIn, outputToken, - minimumAmountOut, + slippage = 0.5, }: { group: Group; mangoAccount: MangoAccount; inputToken: string; amountIn: number; outputToken: string; - minimumAmountOut: number; + slippage: number; }): Promise { const inputBank = group.banksMap.get(inputToken); const outputBank = group.banksMap.get(outputToken); @@ -1140,23 +1135,22 @@ export class MangoClient { ); /* - * - * Find or create associated token account - * + * Find or create associated token accounts */ - let tokenAccountPk = await getAssociatedTokenAddress( + let inputTokenAccountPk = await getAssociatedTokenAddress( inputBank.mint, mangoAccount.owner, ); - const tokenAccExists = - await this.program.provider.connection.getAccountInfo(tokenAccountPk); - + const inputTokenAccExists = + await this.program.provider.connection.getAccountInfo( + inputTokenAccountPk, + ); let preInstructions = []; - if (!tokenAccExists) { + if (!inputTokenAccExists) { preInstructions.push( - createAssociatedTokenAccountInstruction( + Token.createAssociatedTokenAccountInstruction( mangoAccount.owner, - tokenAccountPk, + inputTokenAccountPk, mangoAccount.owner, inputBank.mint, TOKEN_PROGRAM_ID, @@ -1165,41 +1159,99 @@ export class MangoClient { ); } + let outputTokenAccountPk = await getAssociatedTokenAddress( + outputBank.mint, + mangoAccount.owner, + ); + const outputTokenAccExists = + await this.program.provider.connection.getAccountInfo( + outputTokenAccountPk, + ); + if (!outputTokenAccExists) { + preInstructions.push( + Token.createAssociatedTokenAccountInstruction( + mangoAccount.owner, + outputTokenAccountPk, + mangoAccount.owner, + outputBank.mint, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID, + ), + ); + } + /* - * - * Borrow a token and transfer to wallet then transfer back - * + * Transfer input token to users wallet, then swap with the Jupiter route, + * and finally transfer output token from users wallet back to the mango vault */ - // TODO don't hard code decimal # - const decimals = 6; - const nativeAmount = toU64(amountIn, decimals); + const nativeInputAmount = toU64( + amountIn, + inputBank.mintDecimals, + ).toNumber(); const instructions: TransactionInstruction[] = []; - const transferIx = createTransferInstruction( - inputBank.vault, - tokenAccountPk, - inputBank.publicKey, - nativeAmount, - [], + + const transferIx = Token.createTransferInstruction( TOKEN_PROGRAM_ID, + inputBank.vault, + inputTokenAccountPk, + inputBank.publicKey, + [], + nativeInputAmount, ); const inputBankKey = transferIx.keys[2]; transferIx.keys[2] = { ...inputBankKey, isWritable: true, isSigner: false }; instructions.push(transferIx); + console.log('loading jup'); - const transferIx2 = createTransferInstruction( - tokenAccountPk, - inputBank.vault, - mangoAccount.owner, - nativeAmount, - [], + const jupiter = await Jupiter.load({ + connection: this.program.provider.connection, + cluster: 'mainnet-beta', + user: mangoAccount.owner, // or public key + // platformFeeAndAccounts: NO_PLATFORM_FEE, + routeCacheDuration: 10_000, // Will not refetch data on computeRoutes for up to 10 seconds + }); + + console.log('computing routes'); + + const routes = await jupiter.computeRoutes({ + inputMint: inputBank.mint, // Mint address of the input token + outputMint: outputBank.mint, // Mint address of the output token + inputAmount: nativeInputAmount, // raw input amount of tokens + slippage, // The slippage in % terms + forceFetch: false, // false is the default value => will use cache if not older than routeCacheDuration + }); + + console.log( + `route found: ${routes.routesInfos[0].marketInfos[0].amm.label}. generating jup transaction`, + ); + + const { transactions } = await jupiter.exchange({ + routeInfo: routes.routesInfos[0], + }); + console.log('Jupiter Transactions:', transactions); + const { setupTransaction, swapTransaction } = transactions; + + for (const ix of swapTransaction.instructions) { + if ( + ix.programId.toBase58() === + 'JUP2jxvXaqu7NQY1GmNF4m1vodw12LVXYxbFL2uJvfo' + ) { + instructions.push(ix); + } + } + + const transferIx2 = Token.createTransferInstruction( TOKEN_PROGRAM_ID, + outputTokenAccountPk, + outputBank.vault, + mangoAccount.owner, + [], + nativeInputAmount, ); instructions.push(transferIx2); /* - * * Build data objects for margin trade instructions - * */ const targetRemainingAccounts = instructions .map((ix) => [ @@ -1212,8 +1264,9 @@ export class MangoClient { ]) .flat(); - const keys = instructions.map((ix) => ix.keys).flat(); - const vaultIndex = keys.findIndex((k) => k.pubkey.equals(inputBank.vault)); + const vaultIndex = targetRemainingAccounts + .map((x) => x.pubkey.toString()) + .lastIndexOf(inputBank.vault.toString()); const withdraws: FlashLoanWithdraw[] = [ { index: vaultIndex, amount: toU64(amountIn, inputBank.mintDecimals) }, @@ -1236,9 +1289,10 @@ export class MangoClient { } } - console.log('instruction1', transferIx); - console.log('instruction2', transferIx2); - + console.log( + 'instructions', + instructions.map((i) => ({ ...i, programId: i.programId.toString() })), + ); console.log('cpiDatas', cpiDatas); console.log( 'targetRemainingAccounts', @@ -1248,6 +1302,18 @@ export class MangoClient { })), ); + if (setupTransaction) { + await this.program.provider.sendAndConfirm(setupTransaction); + } else if (preInstructions.length) { + const tx = new Transaction(); + for (const ix of preInstructions) { + tx.add(ix); + } + console.log('preInstructions', preInstructions); + + await this.program.provider.sendAndConfirm(tx); + } + return await this.program.methods .flashLoan(withdraws, cpiDatas) .accounts({ @@ -1256,8 +1322,6 @@ export class MangoClient { owner: (this.program.provider as AnchorProvider).wallet.publicKey, }) .remainingAccounts([...parsedHealthAccounts, ...targetRemainingAccounts]) - .preInstructions(preInstructions) - .signers([]) .rpc({ skipPreflight: true }); } diff --git a/ts/client/src/integrations/orca/index.ts b/ts/client/src/integrations/orca/index.ts deleted file mode 100644 index 4fe668c92..000000000 --- a/ts/client/src/integrations/orca/index.ts +++ /dev/null @@ -1,200 +0,0 @@ -// import { -// OrcaPoolToken, -// ORCA_TOKEN_SWAP_ID_DEVNET, -// PoolTokenCount, -// } from '@orca-so/sdk'; -// import { orcaDevnetPoolConfigs } from '@orca-so/sdk/dist/constants/devnet/pools'; -// import { OrcaPoolParams } from '@orca-so/sdk/dist/model/orca/pool/pool-types'; -// import { OrcaPoolConfig as OrcaDevnetPoolConfig } from '@orca-so/sdk/dist/public/devnet/pools/config'; -// import { BN } from '@project-serum/anchor'; -// import { -// AccountInfo, -// AccountLayout, -// TOKEN_PROGRAM_ID, -// u64, -// } from '@solana/spl-token'; -// import { TokenSwap } from '@solana/spl-token-swap'; -// import { Connection, PublicKey } from '@solana/web3.js'; - -// import { Bank } from '../../accounts/bank'; -// import { toNativeDecimals, toUiDecimals } from '../../utils'; -// import * as Tokens from './tokens'; - -// export { ORCA_TOKEN_SWAP_ID_DEVNET }; - -// /* -// Orca ix references: -// swap fn: https://github.com/orca-so/typescript-sdk/blob/main/src/model/orca/pool/orca-pool.ts#L162 -// swap ix: https://github.com/orca-so/typescript-sdk/blob/main/src/public/utils/web3/instructions/pool-instructions.ts#L41 -// */ -// export const buildOrcaInstruction = async ( -// orcaTokenSwapId: PublicKey, -// inputBank: Bank, -// outputBank: Bank, -// amountInU64: BN, -// minimumAmountOutU64: BN, -// ) => { -// // TODO: select the correct pool params based on passed in banks -// const poolParams = orcaDevnetPoolConfigs[OrcaDevnetPoolConfig.ORCA_SOL]; - -// const [authorityForPoolAddress] = await PublicKey.findProgramAddress( -// [poolParams.address.toBuffer()], -// orcaTokenSwapId, -// ); - -// const instruction = TokenSwap.swapInstruction( -// poolParams.address, -// authorityForPoolAddress, -// inputBank.publicKey, // userTransferAuthority -// inputBank.vault, // inputTokenUserAddress -// poolParams.tokens[inputBank.mint.toString()].addr, // inputToken.addr -// poolParams.tokens[outputBank.mint.toString()].addr, // outputToken.addr -// outputBank.vault, // outputTokenUserAddress -// poolParams.poolTokenMint, -// poolParams.feeAccount, -// null, // hostFeeAccount -// orcaTokenSwapId, -// TOKEN_PROGRAM_ID, -// amountInU64, -// minimumAmountOutU64, -// ); - -// instruction.keys[2].isSigner = false; -// instruction.keys[2].isWritable = true; - -// return { instruction, signers: [] }; -// }; - -// export const getOrcaOutputAmount = async ( -// connection: Connection, -// inputToken: string, -// outputToken: string, -// amountIn: number, -// ): Promise => { -// // TODO: select the correct pool params based on passed in banks -// const inputMint = Tokens.solToken; -// const poolParams = getOrcaPoolParams(inputToken, outputToken); - -// const { inputPoolToken, outputPoolToken } = getTokens( -// poolParams, -// inputMint.mint.toString(), -// ); - -// const { inputTokenCount, outputTokenCount } = await getTokenCount( -// connection, -// poolParams, -// inputPoolToken, -// outputPoolToken, -// ); - -// const [poolInputAmount, poolOutputAmount] = [ -// inputTokenCount, -// outputTokenCount, -// ]; - -// const invariant = poolInputAmount.mul(poolOutputAmount); -// const nativeAmountIn = toNativeDecimals(amountIn, 9); - -// const [newPoolOutputAmount] = ceilingDivision( -// invariant, -// poolInputAmount.add(nativeAmountIn), -// ); - -// const outputAmount = poolOutputAmount.sub(newPoolOutputAmount); - -// return toUiDecimals(outputAmount.toNumber(), 6); -// }; - -// function getTokens(poolParams: OrcaPoolParams, inputTokenId: string) { -// if (poolParams.tokens[inputTokenId] == undefined) { -// throw new Error('Input token not part of pool'); -// } - -// const tokenAId = poolParams.tokenIds[0]; -// const tokenBId = poolParams.tokenIds[1]; - -// const forward = tokenAId == inputTokenId; - -// const inputOrcaToken = forward -// ? poolParams.tokens[tokenAId] -// : poolParams.tokens[tokenBId]; -// const outputOrcaToken = forward -// ? poolParams.tokens[tokenBId] -// : poolParams.tokens[tokenAId]; -// return { inputPoolToken: inputOrcaToken, outputPoolToken: outputOrcaToken }; -// } - -// const getOrcaPoolParams = (inputToken: string, outputToken: string) => { -// return orcaDevnetPoolConfigs[OrcaDevnetPoolConfig.ORCA_SOL]; -// }; - -// async function getTokenCount( -// connection: Connection, -// poolParams: OrcaPoolParams, -// inputPoolToken: OrcaPoolToken, -// outputPoolToken: OrcaPoolToken, -// ): Promise { -// if (poolParams.tokens[inputPoolToken.mint.toString()] == undefined) { -// throw new Error('Input token not part of pool'); -// } - -// if (poolParams.tokens[outputPoolToken.mint.toString()] == undefined) { -// throw new Error('Output token not part of pool'); -// } - -// const accountInfos = await connection.getMultipleAccountsInfo([ -// inputPoolToken.addr, -// outputPoolToken.addr, -// ]); - -// const tokens = accountInfos.map((info) => -// info != undefined ? deserializeAccount(info.data) : undefined, -// ); -// const inputTokenAccount = tokens[0], -// outputTokenAccount = tokens[1]; - -// if (inputTokenAccount === undefined || outputTokenAccount === undefined) { -// throw new Error('Unable to fetch accounts for specified tokens.'); -// } - -// return { -// inputTokenCount: inputTokenAccount.amount, -// outputTokenCount: outputTokenAccount.amount, -// }; -// } - -// const deserializeAccount = ( -// data: Buffer | undefined, -// ): AccountInfo | undefined => { -// if (data == undefined || data.length == 0) { -// return undefined; -// } - -// const accountInfo = AccountLayout.decode(data); -// accountInfo.mint = new PublicKey(accountInfo.mint); -// accountInfo.owner = new PublicKey(accountInfo.owner); -// accountInfo.amount = u64.fromBuffer(accountInfo.amount); - -// return accountInfo; -// }; - -// const ZERO = new BN(0); -// const ONE = new BN(1); -// const ceilingDivision = (dividend: u64, divisor: u64): [u64, u64] => { -// let quotient = dividend.div(divisor); -// if (quotient.eq(ZERO)) { -// return [ZERO, divisor]; -// } - -// let remainder = dividend.mod(divisor); -// if (remainder.gt(ZERO)) { -// quotient = quotient.add(ONE); -// divisor = dividend.div(quotient); -// remainder = dividend.mod(quotient); -// if (remainder.gt(ZERO)) { -// divisor = divisor.add(ONE); -// } -// } - -// return [quotient, divisor]; -// }; diff --git a/ts/client/src/integrations/orca/tokens.ts b/ts/client/src/integrations/orca/tokens.ts deleted file mode 100644 index 6b89784a2..000000000 --- a/ts/client/src/integrations/orca/tokens.ts +++ /dev/null @@ -1,41 +0,0 @@ -// import { OrcaToken } from '@orca-so/sdk'; -// import { PublicKey } from '@solana/web3.js'; - -// /** -// * The following content is auto-generated. -// */ - -// export const ethToken: OrcaToken = Object.freeze({ -// tag: 'ETH', -// name: 'Ethereum', -// mint: new PublicKey('Ff5JqsAYUD4vAfQUtfRprT4nXu9e28tTBZTDFMnJNdvd'), -// scale: 9, -// }); - -// export const orcaToken: OrcaToken = Object.freeze({ -// tag: 'ORCA', -// name: 'Orca', -// mint: new PublicKey('orcarKHSqC5CDDsGbho8GKvwExejWHxTqGzXgcewB9L'), -// scale: 6, -// }); - -// export const solToken: OrcaToken = Object.freeze({ -// tag: 'SOL', -// name: 'Solana', -// mint: new PublicKey('So11111111111111111111111111111111111111112'), -// scale: 9, -// }); - -// export const usdcToken: OrcaToken = Object.freeze({ -// tag: 'USDC', -// name: 'USD Coin', -// mint: new PublicKey('EmXq3Ni9gfudTiyNKzzYvpnQqnJEMRw2ttnVXoJXjLo1'), -// scale: 6, -// }); - -// export const usdtToken: OrcaToken = Object.freeze({ -// tag: 'USDT', -// name: 'Tether USD', -// mint: new PublicKey('6PE3Mwjzx9h8kCoBp5YPed9TFoG7du8L98yucBP5ps3x'), -// scale: 6, -// }); diff --git a/ts/client/src/integrations/serum/index.ts b/ts/client/src/integrations/serum/index.ts deleted file mode 100644 index 9d472d35d..000000000 --- a/ts/client/src/integrations/serum/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -// import { Connection, PublicKey } from '@solana/web3.js'; - -// export const getSerumOutputAmount = async ( -// connection: Connection, -// inputMint: string, -// outputToken: string, -// amountIn: number, -// ): Promise => { -// // TODO: select the correct pool params based on passed in banks -// const poolParams = getOrcaPoolParams(inputToken, outputToken); - -// const { inputPoolToken, outputPoolToken } = getTokens( -// poolParams, -// inputMint.mint.toString(), -// ); - -// const { inputTokenCount, outputTokenCount } = await getTokenCount( -// connection, -// poolParams, -// inputPoolToken, -// outputPoolToken, -// ); - -// const [poolInputAmount, poolOutputAmount] = [ -// inputTokenCount, -// outputTokenCount, -// ]; - -// const invariant = poolInputAmount.mul(poolOutputAmount); -// const nativeAmountIn = toNativeDecimals(amountIn, 9); - -// const [newPoolOutputAmount] = ceilingDivision( -// invariant, -// poolInputAmount.add(nativeAmountIn), -// ); - -// const outputAmount = poolOutputAmount.sub(newPoolOutputAmount); - -// return toUiDecimals(outputAmount.toNumber(), 6); -// }; diff --git a/yarn.lock b/yarn.lock index c208f168f..d1a27e3cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,9 +24,9 @@ js-tokens "^4.0.0" "@babel/runtime@^7.10.5": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.0.tgz#6d77142a19cb6088f0af662af1ada37a604d34ae" - integrity sha512-YMQvx/6nKEaucl0MY56mwIG483xk8SDNdlUwb2Ts6FUpr7fm85DxEmsY18LXBNhcTz6tO6JwZV8w1W06v8UKeg== + version "7.18.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4" + integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug== dependencies: regenerator-runtime "^0.13.4" @@ -37,6 +37,18 @@ dependencies: regenerator-runtime "^0.13.4" +"@cykura/sdk-core@npm:@jup-ag/cykura-sdk-core@0.1.8", "@jup-ag/cykura-sdk-core@0.1.8": + version "0.1.8" + resolved "https://registry.yarnpkg.com/@jup-ag/cykura-sdk-core/-/cykura-sdk-core-0.1.8.tgz#ba8724644e18d1006422dbba5c7701360a729b91" + integrity sha512-bVtDA4oEuzj/amuTPVlk1OFpdlYKK6H9nKWg6Tv6mn6MydS/ArC2EY2zuMHtWP+1YJ5CAwxHL/7Kl1k+7XBSoQ== + dependencies: + "@project-serum/anchor" "^0.22.0" + big.js "^5.2.2" + decimal.js "^10.3.1" + jsbi "^4.1.0" + tiny-invariant "^1.1.0" + toformat "^2.0.0" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -99,6 +111,94 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@jup-ag/core@^1.0.0-beta.27": + version "1.0.0-beta.27" + resolved "https://registry.yarnpkg.com/@jup-ag/core/-/core-1.0.0-beta.27.tgz#e5d8ca75ef827b5cb809384c139c371b579a29c5" + integrity sha512-AIGhvDkh16bfagE3IT/DDORAM7Fak+RWPMoHSdCfRE5tqFjyqnJM8c+zbEh3+lhOWIs7iEMi/buiGKamNzx9fA== + dependencies: + "@jup-ag/crema-sdk" "2.0.7" + "@jup-ag/cykura-sdk" "0.1.25" + "@jup-ag/cykura-sdk-core" "0.1.8" + "@jup-ag/lifinity-sdk" "0.1.72" + "@jup-ag/math" "1.0.0-beta.27" + "@jup-ag/whirlpool-sdk" "0.1.1" + "@mercurial-finance/optimist" "0.1.4" + "@project-serum/anchor" "0.23.0" + "@project-serum/serum" "0.13.65" + "@saberhq/stableswap-sdk" "1.13.6" + "@solana/spl-token" "0.1.8" + bn.js "5.2.1" + cross-fetch "3.1.5" + decimal.js "10.3.1" + jsbi "4.3.0" + promise-retry "2.0.1" + +"@jup-ag/crema-sdk@2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@jup-ag/crema-sdk/-/crema-sdk-2.0.7.tgz#f9f19b07d6d32bd85eff9c8ba41c89b7a059cd42" + integrity sha512-EW1B36g2p1xZsXYLdY98pVP9yiI1viZBIIbfWZ9vVue1PDudsU8dNZXyjtnLbOBuRpT6QYecF/FTXcgLEjY7xg== + dependencies: + "@saberhq/solana-contrib" "^1.12.66" + "@saberhq/token-utils" "^1.12.66" + "@solana/buffer-layout" "^4.0.0" + "@solana/spl-token" "^0.1.8" + "@solana/spl-token-v2" "npm:@solana/spl-token@0.2.0" + "@solana/web3.js" "^1.36.0" + bn.js "^5.2.0" + bs58 "^5.0.0" + decimal.js "^10.3.1" + jsbi "^4.2.0" + tiny-invariant "^1.2.0" + +"@jup-ag/cykura-sdk@0.1.25": + version "0.1.25" + resolved "https://registry.yarnpkg.com/@jup-ag/cykura-sdk/-/cykura-sdk-0.1.25.tgz#03b73f9bb580cccb02e6240e43562330e0f396b6" + integrity sha512-DuBcN7SKN3l9lS7l5zADITVeuTEQxwNW7QB7GzcsZiGysauok6z4GIaYUrqGgZ6Vtqa6tJhFAQu9wlylozRlXw== + dependencies: + "@cykura/sdk-core" "npm:@jup-ag/cykura-sdk-core@0.1.8" + "@project-serum/anchor" "^0.22.1" + "@solana/web3.js" "^1.32.0" + tiny-invariant "^1.1.0" + +"@jup-ag/lifinity-sdk@0.1.72": + version "0.1.72" + resolved "https://registry.yarnpkg.com/@jup-ag/lifinity-sdk/-/lifinity-sdk-0.1.72.tgz#ef120303d99cd371fbff9b04d63d8cb3b92c6d9b" + integrity sha512-nHfpaSFsLGjXg9xG/6k4Miik9X4MuGGi5KxYdtSe2a4vR8fQxXNxY/1ATPObAsy2dKV8K7ppkUSwahbXOtLvdQ== + dependencies: + "@project-serum/anchor" "^0.20.1" + "@project-serum/borsh" "^0.2.5" + "@project-serum/serum" "^0.13.61" + "@pythnetwork/client" "^2.5.1" + "@solana/spl-token" "^0.1.8" + "@solana/web3.js" "1.31.0" + decimal.js "^10.3.1" + +"@jup-ag/math@1.0.0-beta.27": + version "1.0.0-beta.27" + resolved "https://registry.yarnpkg.com/@jup-ag/math/-/math-1.0.0-beta.27.tgz#5d3f0f822586ee86b2c46bce392d3801bb3fda9b" + integrity sha512-jJaMRYjVG0oo9js/BkILVNPkBHnzUW9sQDtu9pH/JXis+VPz99Ud+wZV3mXYEo/kHinvJTsb5QuPAhtM32w+TA== + dependencies: + decimal.js "10.3.1" + jsbi "4.3.0" + +"@jup-ag/whirlpool-sdk@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@jup-ag/whirlpool-sdk/-/whirlpool-sdk-0.1.1.tgz#f305bea2cf205994b87358ee5ad667d3c84c320e" + integrity sha512-GaEnG+T4ltQ3eKLVEnBRpatrRsR1v6t6epnp/hlXDTxiHyfFaVK/gmfi6ckCXs+npL/y39OtwsO0QV2zkOJdcg== + dependencies: + "@orca-so/whirlpool-client-sdk" "npm:@jup-ag/whirlpool-client-sdk@0.0.8" + "@project-serum/anchor" "~0.23.0" + "@solana/spl-token" "~0.1.8" + axios "^0.25.0" + bn.js "~5.2.0" + decimal.js "~10.3.1" + tiny-invariant "~1.2.0" + +"@mercurial-finance/optimist@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@mercurial-finance/optimist/-/optimist-0.1.4.tgz#3ed5155fe94d5df0f86d2f47a3506460109eed4a" + integrity sha512-m8QuyPx9j7fGd2grw0mD5WcYtBb8l7+OQI5aHdeIlxPg3QoPrbSdCHyFOuipYbvB0EY5YDbOmyeFwiTcBkBBSw== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -120,6 +220,38 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@orca-so/whirlpool-client-sdk@npm:@jup-ag/whirlpool-client-sdk@0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@jup-ag/whirlpool-client-sdk/-/whirlpool-client-sdk-0.0.8.tgz#d3715266e0a76ab699078ce1f5525f80e09dd825" + integrity sha512-nlAE/huKAWNxJ9g9BhD7nWGqTg/s0kGjWYqccsYM1Nv6CjesvWdtl8N4k81enmYYU2jgjm6f4XYKA8zTLHsBsA== + dependencies: + "@project-serum/anchor" "~0.23.0" + "@solana/spl-token" "~0.1.8" + bn.js "~5.2.0" + decimal.js "~10.3.1" + lru-cache "^7.9.0" + +"@project-serum/anchor@0.23.0", "@project-serum/anchor@~0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.23.0.tgz#2b2eb6b51601b073e8db26663aa2d6c2f2841771" + integrity sha512-LV2/ifZOJVFTZ4GbEloXln3iVfCvO1YM8i7BBCrUm4tehP7irMx4nr4/IabHWOzrQcQElsxSP/lb1tBp+2ff8A== + dependencies: + "@project-serum/borsh" "^0.2.5" + "@solana/web3.js" "^1.36.0" + base64-js "^1.5.1" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^5.3.1" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + find "^0.3.0" + js-sha256 "^0.9.0" + pako "^2.0.3" + snake-case "^3.0.4" + toml "^3.0.0" + "@project-serum/anchor@^0.11.1": version "0.11.1" resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.11.1.tgz#155bff2c70652eafdcfd5559c81a83bb19cec9ff" @@ -140,6 +272,47 @@ snake-case "^3.0.4" toml "^3.0.0" +"@project-serum/anchor@^0.20.1": + version "0.20.1" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.20.1.tgz#0937807e807e8332aa708cfef4bcb6cbb88b4129" + integrity sha512-2TuBmGUn9qeYz6sJINJlElrBuPsaUAtYyUsJ3XplEBf1pczrANAgs5ceJUFzdiqGEWLn+84ObSdBeChT/AXYFA== + dependencies: + "@project-serum/borsh" "^0.2.2" + "@solana/web3.js" "^1.17.0" + base64-js "^1.5.1" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^5.3.1" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + find "^0.3.0" + js-sha256 "^0.9.0" + pako "^2.0.3" + snake-case "^3.0.4" + toml "^3.0.0" + +"@project-serum/anchor@^0.22.0", "@project-serum/anchor@^0.22.1": + version "0.22.1" + resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.22.1.tgz#698a9620f94691de0a12bbc650a5c8380e2f0e8a" + integrity sha512-5pHeyvQhzLahIQ8aZymmDMZJAJFklN0joZdI+YIqFkK2uU/mlKr6rBLQjxysf/j1mLLiNG00tdyLfUtTAdQz7w== + dependencies: + "@project-serum/borsh" "^0.2.5" + "@solana/web3.js" "^1.17.0" + base64-js "^1.5.1" + bn.js "^5.1.2" + bs58 "^4.0.1" + buffer-layout "^1.2.2" + camelcase "^5.3.1" + cross-fetch "^3.1.5" + crypto-hash "^1.3.0" + eventemitter3 "^4.0.7" + find "^0.3.0" + js-sha256 "^0.9.0" + pako "^2.0.3" + snake-case "^3.0.4" + toml "^3.0.0" + "@project-serum/anchor@^0.24.2": version "0.24.2" resolved "https://registry.yarnpkg.com/@project-serum/anchor/-/anchor-0.24.2.tgz#a3c52a99605c80735f446ca9b3a4885034731004" @@ -168,7 +341,7 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" -"@project-serum/serum@^0.13.65": +"@project-serum/serum@0.13.65", "@project-serum/serum@^0.13.61", "@project-serum/serum@^0.13.65": version "0.13.65" resolved "https://registry.yarnpkg.com/@project-serum/serum/-/serum-0.13.65.tgz#6d3cf07912f13985765237f053cca716fe84b0b0" integrity sha512-BHRqsTqPSfFB5p+MgI2pjvMBAQtO8ibTK2fYY96boIFkCI3TTwXDt2gUmspeChKO2pqHr5aKevmexzAcXxrSRA== @@ -179,6 +352,13 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" +"@pythnetwork/client@^2.5.1": + version "2.7.1" + resolved "https://registry.yarnpkg.com/@pythnetwork/client/-/client-2.7.1.tgz#33a3ff108937bc7da765ed9d84878002396719f8" + integrity sha512-q8lRwon69Q6P7TC8u3IFVXvC6Wa0FjxuuvbGclOelE2zbom7ZA2014bwPlu5ta9NDs4EUkUAPv39e+2ikYHyHg== + dependencies: + buffer "^6.0.1" + "@pythnetwork/client@^2.7.0": version "2.7.0" resolved "https://registry.yarnpkg.com/@pythnetwork/client/-/client-2.7.0.tgz#e49725c13614de4fcf4cb45053374783a068b012" @@ -187,6 +367,51 @@ "@solana/web3.js" "^1.30.2" buffer "^6.0.1" +"@saberhq/option-utils@^1.13.30": + version "1.13.30" + resolved "https://registry.yarnpkg.com/@saberhq/option-utils/-/option-utils-1.13.30.tgz#96d76dc87fc137bc7ae84cf515fbd758df88734d" + integrity sha512-/YtbfR1pUqHD9umByNdM5Qf5u2p2TcAa4RKpq2dnBhf56bk/N1e2n2h0UJ+cZXKH6WAqTaN/cuoh13QTtE1Y5w== + dependencies: + tslib "^2.4.0" + +"@saberhq/solana-contrib@^1.12.66", "@saberhq/solana-contrib@^1.13.30", "@saberhq/solana-contrib@^1.13.6": + version "1.13.30" + resolved "https://registry.yarnpkg.com/@saberhq/solana-contrib/-/solana-contrib-1.13.30.tgz#3b35ab351f33522bcae0ae3b3e231fec07dbfd35" + integrity sha512-4itF/Dw8O3AP/51vDoxExEF8WD7xcnXGKGWo6D3ITQlrLPZd3PboZHQVuhByoz0VB2j9hZeP3sLCtN9vh9Nd7w== + dependencies: + "@saberhq/option-utils" "^1.13.30" + "@solana/buffer-layout" "^4.0.0" + "@types/promise-retry" "^1.1.3" + "@types/retry" "^0.12.2" + promise-retry "^2.0.1" + retry "^0.13.1" + tiny-invariant "^1.2.0" + tslib "^2.4.0" + +"@saberhq/stableswap-sdk@1.13.6": + version "1.13.6" + resolved "https://registry.yarnpkg.com/@saberhq/stableswap-sdk/-/stableswap-sdk-1.13.6.tgz#6b45059c0b060180feb679030fe2fbaf0d6efaa5" + integrity sha512-WkMzKnvjAZS6WIYmbqdSmRQXY0X5a6OFsta+tM1+iCp6Yug1OkGYSnYHTZJ4byIgXWvPd9B88c4z5T17sWRUDQ== + dependencies: + "@saberhq/solana-contrib" "^1.13.6" + "@saberhq/token-utils" "^1.13.6" + "@solana/buffer-layout" "^4.0.0" + lodash.mapvalues "^4.6.0" + tiny-invariant "^1.2.0" + tslib "^2.4.0" + +"@saberhq/token-utils@^1.12.66", "@saberhq/token-utils@^1.13.6": + version "1.13.30" + resolved "https://registry.yarnpkg.com/@saberhq/token-utils/-/token-utils-1.13.30.tgz#9f3ad35f21ddc6ee6f2b77fd6719cf2aec72af96" + integrity sha512-ZpzYJ/tkWmgEnIZGTPONtmKuoJjT+mpzi/8jIl2xoQjeg37S3/iuthQO/Pgw2O9UK/4j249tqqG0V/NFvPMM5w== + dependencies: + "@saberhq/solana-contrib" "^1.13.30" + "@solana/buffer-layout" "^4.0.0" + "@solana/spl-token" "^0.1.8" + "@ubeswap/token-math" "^5.1.6" + tiny-invariant "^1.2.0" + tslib "^2.4.0" + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -214,6 +439,13 @@ bigint-buffer "^1.1.5" bignumber.js "^9.0.1" +"@solana/buffer-layout@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-3.0.0.tgz#b9353caeb9a1589cb77a1b145bcb1a9a93114326" + integrity sha512-MVdgAKKL39tEs0l8je0hKaXLQFb7Rdfb0Xg2LjFZd8Lfdazkg6xiS98uAZrEKvaoF3i4M95ei9RydkGIDMeo3w== + dependencies: + buffer "~6.0.3" + "@solana/buffer-layout@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.0.tgz#75b1b11adc487234821c81dfae3119b73a5fd734" @@ -221,7 +453,17 @@ dependencies: buffer "~6.0.3" -"@solana/spl-token@^0.1.6": +"@solana/spl-token-v2@npm:@solana/spl-token@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.2.0.tgz#329bb6babb5de0f9c40035ddb1657f01a8347acd" + integrity sha512-RWcn31OXtdqIxmkzQfB2R+WpsJOVS6rKuvpxJFjvik2LyODd+WN58ZP3Rpjpro03fscGAkzlFuP3r42doRJgyQ== + dependencies: + "@solana/buffer-layout" "^4.0.0" + "@solana/buffer-layout-utils" "^0.2.0" + "@solana/web3.js" "^1.32.0" + start-server-and-test "^1.14.0" + +"@solana/spl-token@0.1.8", "@solana/spl-token@^0.1.6", "@solana/spl-token@^0.1.8", "@solana/spl-token@~0.1.8": version "0.1.8" resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.1.8.tgz#f06e746341ef8d04165e21fc7f555492a2a0faa6" integrity sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ== @@ -233,15 +475,25 @@ buffer-layout "^1.2.0" dotenv "10.0.0" -"@solana/spl-token@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.2.0.tgz#329bb6babb5de0f9c40035ddb1657f01a8347acd" - integrity sha512-RWcn31OXtdqIxmkzQfB2R+WpsJOVS6rKuvpxJFjvik2LyODd+WN58ZP3Rpjpro03fscGAkzlFuP3r42doRJgyQ== +"@solana/web3.js@1.31.0": + version "1.31.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.31.0.tgz#7a313d4c1a90b77f27ddbfe845a10d6883e06452" + integrity sha512-7nHHx1JNFnrt15e9y8m38I/EJCbaB+bFC3KZVM1+QhybCikFxGMtGA5r7PDC3GEL1R2RZA8yKoLkDKo3vzzqnw== dependencies: - "@solana/buffer-layout" "^4.0.0" - "@solana/buffer-layout-utils" "^0.2.0" - "@solana/web3.js" "^1.32.0" - start-server-and-test "^1.14.0" + "@babel/runtime" "^7.12.5" + "@ethersproject/sha2" "^5.5.0" + "@solana/buffer-layout" "^3.0.0" + bn.js "^5.0.0" + borsh "^0.4.0" + bs58 "^4.0.1" + buffer "6.0.1" + cross-fetch "^3.1.4" + jayson "^3.4.4" + js-sha3 "^0.8.0" + rpc-websockets "^7.4.2" + secp256k1 "^4.0.2" + superstruct "^0.14.2" + tweetnacl "^1.0.0" "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0", "@solana/web3.js@^1.36.0": version "1.43.6" @@ -314,6 +566,18 @@ resolved "https://registry.yarnpkg.com/@tsconfig/recommended/-/recommended-1.0.1.tgz#7619bad397e06ead1c5182926c944e0ca6177f52" integrity sha512-2xN+iGTbPBEzGSnVp/Hd64vKJCJWxsi9gfs88x4PPMyEjHJoA3o5BY9r5OLPHIZU2pAQxkSAsJFqn6itClP8mQ== +"@types/big.js@^6.1.3": + version "6.1.3" + resolved "https://registry.yarnpkg.com/@types/big.js/-/big.js-6.1.3.tgz#c008dec4dae24c7a338ebb4521c46e9609020807" + integrity sha512-fHh2h1cFlvGP0kFCqoAsnuQoM0n3xHB6HxgZvELt7dji+BtK/j938MRL0nG5AA45EgibuFcPjgLlkqfUPCyoKw== + +"@types/bn.js@^4.11.5": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + "@types/bs58@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/bs58/-/bs58-4.0.1.tgz#3d51222aab067786d3bc3740a84a7f5a0effaa37" @@ -377,6 +641,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24" integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A== +"@types/promise-retry@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@types/promise-retry/-/promise-retry-1.1.3.tgz#baab427419da9088a1d2f21bf56249c21b3dd43c" + integrity sha512-LxIlEpEX6frE3co3vCO2EUJfHIta1IOmhDlcAsR4GMMv9hev1iTI9VwberVGkePJAuLZs5rMucrV8CziCfuJMw== + dependencies: + "@types/retry" "*" + "@types/qs@*": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" @@ -387,6 +658,11 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== +"@types/retry@*", "@types/retry@^0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" + integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== + "@types/ws@^7.4.4": version "7.4.7" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" @@ -464,6 +740,17 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" +"@ubeswap/token-math@^5.1.6": + version "5.1.6" + resolved "https://registry.yarnpkg.com/@ubeswap/token-math/-/token-math-5.1.6.tgz#193d1877e34ec4056f6ffcda13611383775c652b" + integrity sha512-OS0L+WfdZ7jXX6Q/MFC5hIAAIposSDLWvnbx0F2EI0DRRhXxxGEXpmWLAVdJwZbbFPw0TQ+pVz4yJLVZP/9vQw== + dependencies: + "@types/big.js" "^6.1.3" + big.js "^6.2.0" + decimal.js-light "^2.5.1" + tiny-invariant "^1.2.0" + tslib "^2.4.0" + "@ungap/promise-all-settled@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" @@ -583,6 +870,13 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" +axios@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a" + integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g== + dependencies: + follow-redirects "^1.14.7" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -605,11 +899,21 @@ base64-js@^1.3.1, base64-js@^1.5.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + big.js@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.1.1.tgz#63b35b19dc9775c94991ee5db7694880655d5537" integrity sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg== +big.js@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.0.tgz#39c60822aecb0f34a1d79a90fe9908a0ddf45e1d" + integrity sha512-paIKvJiAaOYdLt6MfnvxkDo64lTOV257XYJyX3oJnJQocIclUn+48k6ZerH/c5FxWE6DGJu1TKDYis7tqHg9kg== + bigint-buffer@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/bigint-buffer/-/bigint-buffer-1.1.5.tgz#d038f31c8e4534c1f8d0015209bf34b4fa6dd442" @@ -639,6 +943,11 @@ bluebird@3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== +bn.js@5.2.1, bn.js@^5.1.0, bn.js@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" @@ -649,10 +958,15 @@ bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.2.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== -bn.js@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== +borsh@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.4.0.tgz#9dd6defe741627f1315eac2a73df61421f6ddb9f" + integrity sha512-aX6qtLya3K0AkT66CmYWCCDr77qsE9arV05OmdFpmat9qu8Pg9J5tBUPDztAW5fNh/d/MyVG/OYziP52Ndzx1g== + dependencies: + "@types/bn.js" "^4.11.5" + bn.js "^5.0.0" + bs58 "^4.0.0" + text-encoding-utf-8 "^1.0.2" borsh@^0.7.0: version "0.7.0" @@ -853,7 +1167,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-fetch@^3.1.5: +cross-fetch@3.1.5, cross-fetch@^3.1.4, cross-fetch@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== @@ -893,6 +1207,16 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== +decimal.js-light@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/decimal.js-light/-/decimal.js-light-2.5.1.tgz#134fd32508f19e208f4fb2f8dac0d2626a867934" + integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg== + +decimal.js@10.3.1, decimal.js@^10.3.1, decimal.js@~10.3.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" + integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== + deep-eql@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" @@ -982,6 +1306,11 @@ enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -1263,7 +1592,7 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== -follow-redirects@^1.14.0: +follow-redirects@^1.14.0, follow-redirects@^1.14.7: version "1.15.1" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== @@ -1540,6 +1869,11 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsbi@4.3.0, jsbi@^4.1.0, jsbi@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-4.3.0.tgz#b54ee074fb6fcbc00619559305c8f7e912b04741" + integrity sha512-SnZNcinB4RIcnEyZqFPdGPVgrg2AcnykiBy0sHVJQKHYeaLUvi3Exj+iaPpLnFVkDPZIV4U0yvgC9/R4uEAZ9g== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -1597,6 +1931,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.mapvalues@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -1641,6 +1980,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.9.0: + version "7.10.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.10.1.tgz#db577f42a94c168f676b638d15da8fb073448cab" + integrity sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A== + lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" @@ -1911,6 +2255,14 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +promise-retry@2.0.1, promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + ps-tree@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" @@ -1967,6 +2319,16 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -2210,6 +2572,11 @@ through@2, "through@>=2.2.7 <3", through@~2.3, through@~2.3.1: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= +tiny-invariant@^1.1.0, tiny-invariant@^1.2.0, tiny-invariant@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.2.0.tgz#a1141f86b672a9148c72e978a19a73b9b94a15a9" + integrity sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg== + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -2217,6 +2584,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +toformat@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/toformat/-/toformat-2.0.0.tgz#7a043fd2dfbe9021a4e36e508835ba32056739d8" + integrity sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ== + toml@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" @@ -2282,7 +2654,7 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3, tslib@^2.1.0: +tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==