@@ -25,25 +24,28 @@ export const CreatePoolSuccess = ({ poolCreatedData, setIsOpen }: CreatePoolSucc
Your pool has been created. It will be verified before it shows on mrgntrade.
- {poolCreatedData && (
+ {poolData && (
- {poolCreatedData.name} ({poolCreatedData.symbol})
+ {poolData.name} ({poolData.symbol})
- {shortenAddress(poolCreatedData.mint)}
+
+ {shortenAddress(poolData.group || poolData.mint)}
+
+
)}
diff --git a/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/index.tsx b/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/index.tsx
index 54b768bc89..6da4724922 100644
--- a/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/index.tsx
+++ b/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/index.tsx
@@ -1,5 +1,4 @@
export * from "./CreatePoolDialog";
-export * from "./components/CreatePoolSearch";
export * from "./components/CreatePoolMint";
export * from "./components/CreatePoolForm";
export * from "./components/CreatePoolSuccess";
diff --git a/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/types.ts b/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/types.ts
index eee3c3026d..7d4f80e36b 100644
--- a/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/types.ts
+++ b/apps/marginfi-v2-trading/src/components/common/Pool/CreatePoolDialog/types.ts
@@ -1,8 +1,6 @@
import { PublicKey } from "@solana/web3.js";
-import { z } from "zod";
export enum CreatePoolState {
- SEARCH = "initial",
MINT = "mint",
FORM = "form",
LOADING = "loading",
@@ -10,45 +8,12 @@ export enum CreatePoolState {
ERROR = "error",
}
-export function verifyPublickey(key: string, allowPDA: boolean = false) {
- try {
- const _ = new PublicKey(key).toBytes();
- } catch (error) {
- return false;
- }
-
- if (!allowPDA && !PublicKey.isOnCurve(new PublicKey(key).toBytes())) {
- return false;
- }
-
- return true;
-}
-
-function superRefinePublickey(val: string, ctx: z.RefinementCtx) {}
-
-export const formSchema = z
- .object({
- mint: z
- .string({
- required_error: "You need to enter a valid token mint.",
- })
- .superRefine(superRefinePublickey),
- name: z.string(),
- symbol: z.string(),
- decimals: z.string().refine((value) => !isNaN(Number(value)), {
- message: "Decimals must be a number",
- }),
- oracle: z
- .string({
- required_error: "You need to enter a valid oracle public key.",
- })
- .superRefine(superRefinePublickey),
- imageUpload: typeof window !== "undefined" ? z.instanceof(File).optional() : z.any().optional(),
- imageDownload: z.string().optional(),
- })
- .refine((data) => data.imageUpload || data.imageDownload, {
- message: "Token image must be provided",
- path: ["imageUpload", "imageDownload"],
- });
-
-export type FormValues = z.infer
;
+export type PoolData = {
+ mint: PublicKey;
+ name: string;
+ symbol: string;
+ icon: string;
+ decimals: number;
+ quoteBank: "USDC" | "LST";
+ group?: PublicKey;
+};
diff --git a/apps/marginfi-v2-trading/src/components/common/Pool/index.tsx b/apps/marginfi-v2-trading/src/components/common/Pool/index.tsx
index 0c152d618b..8a64b44b8a 100644
--- a/apps/marginfi-v2-trading/src/components/common/Pool/index.tsx
+++ b/apps/marginfi-v2-trading/src/components/common/Pool/index.tsx
@@ -3,3 +3,4 @@ export * from "./CreatePoolDialog";
export * from "./PoolCard";
export * from "./PoolSearch/PoolSearch";
export * from "./PoolListItem";
+export * from "./CreatePoolSoon";
diff --git a/apps/marginfi-v2-trading/src/components/mobile/MobileNavbar/MobileNavbar.tsx b/apps/marginfi-v2-trading/src/components/mobile/MobileNavbar/MobileNavbar.tsx
index a415ad0275..7072c8be09 100644
--- a/apps/marginfi-v2-trading/src/components/mobile/MobileNavbar/MobileNavbar.tsx
+++ b/apps/marginfi-v2-trading/src/components/mobile/MobileNavbar/MobileNavbar.tsx
@@ -8,7 +8,7 @@ import { cn } from "@mrgnlabs/mrgn-utils";
import { useUiStore } from "~/store";
import { useOs } from "~/hooks/use-os";
-import { CreatePoolSoon } from "~/components/common/Pool/CreatePoolSoon";
+import { CreatePoolDialog, CreatePoolSoon } from "~/components/common/Pool";
export interface NavLinkInfo {
href: string;
@@ -19,7 +19,8 @@ export interface NavLinkInfo {
}
const CreatePoolTrigger = (children: ReactNode) => {
- return ;
+ return ;
+ // ;
};
export const mobileLinks: NavLinkInfo[] = [
diff --git a/apps/marginfi-v2-trading/src/config/trade.ts b/apps/marginfi-v2-trading/src/config/trade.ts
index 5e180b8bad..7c0ec3a663 100644
--- a/apps/marginfi-v2-trading/src/config/trade.ts
+++ b/apps/marginfi-v2-trading/src/config/trade.ts
@@ -1,8 +1,12 @@
+const invalidateCache = process.env.NEXT_PUBLIC_INVALIDATE_GCP_CACHE === "true" ? `?t=${Date.now()}` : "";
+
export const TRADE_GROUPS_MAP =
- process.env.NEXT_PUBLIC_GROUPS_MAP || "https://storage.googleapis.com/mrgn-public/mfi-trade-groups.json";
+ (process.env.NEXT_PUBLIC_GROUPS_MAP || "https://storage.googleapis.com/mrgn-public/mfi-trade-groups.json") +
+ invalidateCache;
export const TOKEN_METADATA_MAP =
- process.env.NEXT_PUBLIC_TOKENS_MAP ||
- "https://storage.googleapis.com/mrgn-public/mfi-trade-token-metadata-cache.json";
+ (process.env.NEXT_PUBLIC_TOKENS_MAP ||
+ "https://storage.googleapis.com/mrgn-public/mfi-trade-token-metadata-cache.json") + invalidateCache;
export const BANK_METADATA_MAP =
- process.env.NEXT_PUBLIC_BANKS_MAP || "https://storage.googleapis.com/mrgn-public/mfi-trade-bank-metadata-cache.json";
+ (process.env.NEXT_PUBLIC_BANKS_MAP ||
+ "https://storage.googleapis.com/mrgn-public/mfi-trade-bank-metadata-cache.json") + invalidateCache;
export const POOLS_PER_PAGE = 12;
diff --git a/apps/marginfi-v2-trading/src/pages/api/birdeye/token.ts b/apps/marginfi-v2-trading/src/pages/api/birdeye/token.ts
index 99c0fd2651..813aa0337a 100644
--- a/apps/marginfi-v2-trading/src/pages/api/birdeye/token.ts
+++ b/apps/marginfi-v2-trading/src/pages/api/birdeye/token.ts
@@ -2,6 +2,10 @@ import { NextApiRequest, NextApiResponse } from "next";
import type { TokenData } from "~/types";
+function cdnImageUrl(url: string) {
+ return `https://img.fotofolio.xyz/?url=${encodeURIComponent(url)}`;
+}
+
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const { address } = req.query;
if (!address) {
@@ -33,7 +37,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
address: data.address,
name: data.name,
symbol: data.symbol,
- imageUrl: data.logoURI,
+ imageUrl: cdnImageUrl(data.logoURI),
decimals: data.decimals,
price: data.price,
priceChange24h: data.priceChange24hPercent,
diff --git a/apps/marginfi-v2-trading/src/pages/api/pool/auth.ts b/apps/marginfi-v2-trading/src/pages/api/pool/auth.ts
new file mode 100644
index 0000000000..3b67779e7a
--- /dev/null
+++ b/apps/marginfi-v2-trading/src/pages/api/pool/auth.ts
@@ -0,0 +1,31 @@
+import type { NextApiRequest, NextApiResponse } from "next";
+
+const AUTH_URL = "http://202.8.10.73:3000/auth/jwt";
+const USERNAME = process.env.API_AUTH_USERNAME;
+const PASSWORD = process.env.API_AUTH_PASSWORD;
+
+export default async function handler(req: NextApiRequest, res: NextApiResponse) {
+ try {
+ const encodedCredentials = Buffer.from(`${USERNAME}:${PASSWORD}`).toString("base64");
+
+ const response = await fetch(AUTH_URL, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Basic ${encodedCredentials}`, // Basic Auth Header
+ },
+ body: JSON.stringify({}),
+ });
+
+ if (!response.ok) {
+ return res.status(response.status).json({ error: "Failed to authenticate" });
+ }
+
+ const data = await response.json();
+ const token = data.jwt;
+
+ res.status(200).json({ token });
+ } catch (error) {
+ res.status(500).json({ error: "Internal Server Error" });
+ }
+}
diff --git a/apps/marginfi-v2-trading/src/pages/api/pool/create.ts b/apps/marginfi-v2-trading/src/pages/api/pool/create.ts
new file mode 100644
index 0000000000..99c6a72088
--- /dev/null
+++ b/apps/marginfi-v2-trading/src/pages/api/pool/create.ts
@@ -0,0 +1,29 @@
+import type { NextApiRequest, NextApiResponse } from "next";
+
+const ARENA_URL = "http://202.8.10.73:3000/arena/add_pool";
+
+export default async function handler(req: NextApiRequest, res: NextApiResponse) {
+ if (req.method === "POST") {
+ try {
+ const response = await fetch(ARENA_URL, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `${req.headers.authorization || ""}`,
+ },
+ body: JSON.stringify(req.body),
+ });
+
+ if (!response.ok) {
+ return res.status(response.status).json({ error: "Failed to add pool" });
+ }
+
+ const data = await response.json();
+ res.status(200).json(data);
+ } catch (error) {
+ res.status(500).json({ error: "Internal Server Error" });
+ }
+ } else {
+ res.status(405).json({ error: "Method Not Allowed" });
+ }
+}
diff --git a/apps/marginfi-v2-trading/src/pages/api/pool.ts b/apps/marginfi-v2-trading/src/pages/api/pool/request.ts
similarity index 100%
rename from apps/marginfi-v2-trading/src/pages/api/pool.ts
rename to apps/marginfi-v2-trading/src/pages/api/pool/request.ts
diff --git a/apps/marginfi-v2-trading/src/store/tradeStore.ts b/apps/marginfi-v2-trading/src/store/tradeStore.ts
index 983acb3b96..c57918959d 100644
--- a/apps/marginfi-v2-trading/src/store/tradeStore.ts
+++ b/apps/marginfi-v2-trading/src/store/tradeStore.ts
@@ -152,6 +152,7 @@ type TradeStoreState = {
const { programId } = getConfig();
const USDC_MINT = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
+const LST_MINT = new PublicKey("LSTxxxnJzKDFSLr4dUkPcmCf5VyryEqzPLz5j4bpxFp");
let fuse: Fuse | null = null;
@@ -604,8 +605,12 @@ async function getGroupData({
);
// change this logic when adding more collateral banks
- const tokenBanks = extendedBankInfos.filter((bank) => !bank.info.rawBank.mint.equals(USDC_MINT));
- const collateralBanks = extendedBankInfos.filter((bank) => bank.info.rawBank.mint.equals(USDC_MINT));
+ const tokenBanks = extendedBankInfos.filter(
+ (bank) => !bank.info.rawBank.mint.equals(USDC_MINT) && !bank.info.rawBank.mint.equals(LST_MINT)
+ );
+ const collateralBanks = extendedBankInfos.filter(
+ (bank) => bank.info.rawBank.mint.equals(USDC_MINT) || bank.info.rawBank.mint.equals(LST_MINT)
+ );
if (tokenBanks.length > 1) console.error("Inconsitency in token banks!");
diff --git a/apps/marginfi-v2-ui/src/utils/mintUtils.ts b/apps/marginfi-v2-ui/src/utils/mintUtils.ts
index 61e16dd8d3..65b11d9fad 100644
--- a/apps/marginfi-v2-ui/src/utils/mintUtils.ts
+++ b/apps/marginfi-v2-ui/src/utils/mintUtils.ts
@@ -86,7 +86,6 @@ export async function fetchMintOverview(mint: string): Promise {
});
const responseBody = await response.json();
- console.log({ responseBody });
if (responseBody.success) {
const volume = responseBody.data.v24h;
const volumeUsd = responseBody.data.v24hUSD;
diff --git a/packages/marginfi-client-v2/src/client.ts b/packages/marginfi-client-v2/src/client.ts
index 25ad3793c6..47a422d601 100644
--- a/packages/marginfi-client-v2/src/client.ts
+++ b/packages/marginfi-client-v2/src/client.ts
@@ -680,6 +680,8 @@ class MarginfiClient {
const keypair = seed ?? Keypair.generate();
+ const bundleTipIx = makeBundleTipIx(admin);
+
const priorityFeeIx = priorityFee ? makePriorityFeeIx(priorityFee) : [];
const bankIxs = await this.group.makePoolAddBankIx(this.program, keypair.publicKey, mint, bankConfig, {
@@ -689,7 +691,7 @@ class MarginfiClient {
const signers = [...bankIxs.keys, keypair];
- const tx = new Transaction().add(...priorityFeeIx, ...bankIxs.instructions);
+ const tx = new Transaction().add(bundleTipIx, ...priorityFeeIx, ...bankIxs.instructions);
const sig = await this.processTransaction(tx, signers, opts);
dbg("Created Marginfi group %s", sig);
@@ -711,9 +713,11 @@ class MarginfiClient {
const accountKeypair = seed ?? Keypair.generate();
+ const bundleTipIx = makeBundleTipIx(this.provider.publicKey);
+
const ixs = await this.makeCreateMarginfiGroupIx(accountKeypair.publicKey);
const signers = [...ixs.keys, accountKeypair];
- const tx = new Transaction().add(...ixs.instructions, ...(additionalIxs ?? []));
+ const tx = new Transaction().add(bundleTipIx, ...ixs.instructions, ...(additionalIxs ?? []));
const sig = await this.processTransaction(tx, signers, opts);
dbg("Created Marginfi group %s", sig);
diff --git a/packages/marginfi-client-v2/src/models/group.ts b/packages/marginfi-client-v2/src/models/group.ts
index e7266503c9..962ce1a63e 100644
--- a/packages/marginfi-client-v2/src/models/group.ts
+++ b/packages/marginfi-client-v2/src/models/group.ts
@@ -193,7 +193,8 @@ class MarginfiGroup {
bankMint: bankMint,
bank: bankPubkey,
tokenProgram: TOKEN_PROGRAM_ID,
- oracleKey: rawBankConfigCompact.oracleKey,
+ // if two oracle keys: first is feed id, second is oracle key
+ oracleKey: rawBankConfig.oracle?.keys[1] || rawBankConfigCompact.oracleKey,
},
{
bankConfig: rawBankConfigCompact,
diff --git a/packages/mrgn-utils/package.json b/packages/mrgn-utils/package.json
index d2a65a507e..7e9bb50595 100644
--- a/packages/mrgn-utils/package.json
+++ b/packages/mrgn-utils/package.json
@@ -16,6 +16,7 @@
"@coral-xyz/anchor": "^0.30.1",
"@jup-ag/api": "^6.0.23",
"@jup-ag/react-hook": "^6.0.0-beta.8",
+ "@jup-ag/referral-sdk": "^0.1.7",
"@mrgnlabs/marginfi-client-v2": "*",
"@mrgnlabs/mrgn-common": "*",
"@mrgnlabs/marginfi-v2-ui-state": "*",
diff --git a/packages/mrgn-utils/src/actions/flashloans/builders.ts b/packages/mrgn-utils/src/actions/flashloans/builders.ts
index 1845baf438..dd9cb94a57 100644
--- a/packages/mrgn-utils/src/actions/flashloans/builders.ts
+++ b/packages/mrgn-utils/src/actions/flashloans/builders.ts
@@ -6,16 +6,11 @@ import { MarginfiAccountWrapper, MarginfiClient } from "@mrgnlabs/marginfi-clien
import { ActiveBankInfo, ExtendedBankInfo } from "@mrgnlabs/marginfi-v2-ui-state";
import { LUT_PROGRAM_AUTHORITY_INDEX, nativeToUi, uiToNative } from "@mrgnlabs/mrgn-common";
-import {
- deserializeInstruction,
- getAdressLookupTableAccounts,
- getFeeAccount,
- getSwapQuoteWithRetry,
- TOKEN_2022_MINTS,
-} from "../helpers";
+import { deserializeInstruction, getAdressLookupTableAccounts, getSwapQuoteWithRetry } from "../helpers";
import { isWholePosition } from "../../mrgnUtils";
import { ActionMethod, LoopingObject, LoopingOptions, RepayWithCollatOptions } from "../types";
import { STATIC_SIMULATION_ERRORS } from "../../errors";
+import { TOKEN_2022_MINTS, getFeeAccount } from "../../jup-referral.utils";
import {
calculateMaxRepayableCollateral,
diff --git a/packages/mrgn-utils/src/actions/helpers.ts b/packages/mrgn-utils/src/actions/helpers.ts
index 3d22489993..fcc061e659 100644
--- a/packages/mrgn-utils/src/actions/helpers.ts
+++ b/packages/mrgn-utils/src/actions/helpers.ts
@@ -1,8 +1,10 @@
import { PublicKey, TransactionInstruction, Connection, AddressLookupTableAccount } from "@solana/web3.js";
+import { createJupiterApiClient, QuoteGetRequest } from "@jup-ag/api";
import { WalletContextState } from "@solana/wallet-adapter-react";
-import { WalletContextStateOverride } from "../wallet";
import { ExtendedBankInfo } from "@mrgnlabs/marginfi-v2-ui-state";
-import { createJupiterApiClient, QuoteGetRequest } from "@jup-ag/api";
+
+import { WalletContextStateOverride } from "../wallet";
+import { REFERRAL_ACCOUNT_PUBKEY, REFERRAL_PROGRAM_ID } from "../jup-referral.utils";
// ------------------------------------------------------------------//
// Helpers //
@@ -57,19 +59,6 @@ export async function getAdressLookupTableAccounts(
}, new Array());
}
-export const TOKEN_2022_MINTS = ["2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo"];
-
-export const getFeeAccount = (mint: PublicKey) => {
- const referralProgramPubkey = new PublicKey("REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3");
- const referralAccountPubkey = new PublicKey("Mm7HcujSK2JzPW4eX7g4oqTXbWYDuFxapNMHXe8yp1B");
-
- const [feeAccount] = PublicKey.findProgramAddressSync(
- [Buffer.from("referral_ata"), referralAccountPubkey.toBuffer(), mint.toBuffer()],
- referralProgramPubkey
- );
- return feeAccount.toBase58();
-};
-
export const formatAmount = (
newAmount: string,
maxAmount: number,
diff --git a/packages/mrgn-utils/src/actions/individualFlows.ts b/packages/mrgn-utils/src/actions/individualFlows.ts
index 2745fb7152..7dbb48f560 100644
--- a/packages/mrgn-utils/src/actions/individualFlows.ts
+++ b/packages/mrgn-utils/src/actions/individualFlows.ts
@@ -317,17 +317,6 @@ export async function repay({
}
}
-const getFeeAccount = async (mint: PublicKey) => {
- const referralProgramPubkey = new PublicKey("REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3");
- const referralAccountPubkey = new PublicKey("Mm7HcujSK2JzPW4eX7g4oqTXbWYDuFxapNMHXe8yp1B");
-
- const [feeAccount] = await PublicKey.findProgramAddressSync(
- [Buffer.from("referral_ata"), referralAccountPubkey.toBuffer(), mint.toBuffer()],
- referralProgramPubkey
- );
- return feeAccount.toBase58();
-};
-
export async function looping({
marginfiClient,
marginfiAccount,
diff --git a/packages/mrgn-utils/src/index.ts b/packages/mrgn-utils/src/index.ts
index 4790cacb91..0c9f9d2a32 100644
--- a/packages/mrgn-utils/src/index.ts
+++ b/packages/mrgn-utils/src/index.ts
@@ -10,3 +10,5 @@ export * from "./lstUtils";
export * from "./analytics";
export * from "./hooks";
export * from "./lst-apy.utils";
+export * from "./token.utils";
+export * from "./jup-referral.utils";
diff --git a/packages/mrgn-utils/src/jup-referral.utils.ts b/packages/mrgn-utils/src/jup-referral.utils.ts
new file mode 100644
index 0000000000..4dfc5da28a
--- /dev/null
+++ b/packages/mrgn-utils/src/jup-referral.utils.ts
@@ -0,0 +1,29 @@
+import { ReferralProvider } from "@jup-ag/referral-sdk";
+import { Connection, PublicKey } from "@solana/web3.js";
+
+export const TOKEN_2022_MINTS = ["2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo"];
+export const REFERRAL_PROGRAM_ID = new PublicKey("REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3");
+export const REFERRAL_ACCOUNT_PUBKEY = new PublicKey("Mm7HcujSK2JzPW4eX7g4oqTXbWYDuFxapNMHXe8yp1B");
+
+export async function createReferalTokenAccount(connection: Connection, payer: PublicKey, mint: PublicKey) {
+ const provider = new ReferralProvider(connection);
+
+ const { tx, referralTokenAccountPubKey } = await provider.initializeReferralTokenAccount({
+ payerPubKey: payer,
+ referralAccountPubKey: REFERRAL_ACCOUNT_PUBKEY,
+ mint,
+ });
+
+ return tx;
+}
+
+export const getFeeAccount = (mint: PublicKey) => {
+ const referralProgramPubkey = REFERRAL_PROGRAM_ID;
+ const referralAccountPubkey = REFERRAL_ACCOUNT_PUBKEY;
+
+ const [feeAccount] = PublicKey.findProgramAddressSync(
+ [Buffer.from("referral_ata"), referralAccountPubkey.toBuffer(), mint.toBuffer()],
+ referralProgramPubkey
+ );
+ return feeAccount.toBase58();
+};
diff --git a/packages/mrgn-utils/src/token.utils.ts b/packages/mrgn-utils/src/token.utils.ts
new file mode 100644
index 0000000000..c8ac14644a
--- /dev/null
+++ b/packages/mrgn-utils/src/token.utils.ts
@@ -0,0 +1,19 @@
+export async function getBearerToken() {
+ // Check if token exists in sessionStorage
+ const token = sessionStorage.getItem("jwtToken");
+ if (token) {
+ return token;
+ }
+
+ const response = await fetch("/api/pool/auth");
+ if (response.ok) {
+ const data = await response.json();
+ const newToken = data.token;
+
+ sessionStorage.setItem("jwtToken", newToken);
+
+ return newToken;
+ } else {
+ throw new Error("Failed to retrieve Bearer token");
+ }
+}
diff --git a/turbo.json b/turbo.json
index 0b52fdde32..439e879304 100644
--- a/turbo.json
+++ b/turbo.json
@@ -91,6 +91,9 @@
"NEXT_PUBLIC_TOKENS_MAP",
"NEXT_RUNTIME",
"PRIVATE_RPC_ENDPOINT_OVERRIDE",
- "NEXT_PUBLIC_APP_ID"
+ "NEXT_PUBLIC_APP_ID",
+ "NEXT_PUBLIC_INVALIDATE_GCP_CACHE",
+ "API_AUTH_USERNAME",
+ "API_AUTH_PASSWORD"
]
}
diff --git a/yarn.lock b/yarn.lock
index cab4a1477a..393e63e7c6 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2159,7 +2159,7 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"
-"@cykura/sdk-core@npm:@jup-ag/cykura-sdk-core@0.1.8":
+"@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.npmjs.org/@jup-ag/cykura-sdk-core/-/cykura-sdk-core-0.1.8.tgz"
integrity sha512-bVtDA4oEuzj/amuTPVlk1OFpdlYKK6H9nKWg6Tv6mn6MydS/ArC2EY2zuMHtWP+1YJ5CAwxHL/7Kl1k+7XBSoQ==
@@ -2247,7 +2247,7 @@
nanoid "^3.3.4"
tweetnacl "^1.0.3"
-"@dradex/idl@npm:@jup-ag/dradex-idl@0.2.1":
+"@dradex/idl@npm:@jup-ag/dradex-idl@0.2.1", "@jup-ag/dradex-idl@0.2.1":
version "0.2.1"
resolved "https://registry.npmjs.org/@jup-ag/dradex-idl/-/dradex-idl-0.2.1.tgz"
integrity sha512-CZ5GZTLExy1+fw/tFOo6C4AbU0o/PcqJxxQpDp5UkSJ0SXbz7ZGMz9DfKu+htJuAwxwGgS/rbQfeBoU9fhDXuQ==
@@ -4686,18 +4686,6 @@
decimal.js "^10.3.1"
jsbi "^4.3.0"
-"@jup-ag/cykura-sdk-core@0.1.8":
- version "0.1.8"
- resolved "https://registry.npmjs.org/@jup-ag/cykura-sdk-core/-/cykura-sdk-core-0.1.8.tgz"
- 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"
-
"@jup-ag/cykura-sdk@0.1.25":
version "0.1.25"
resolved "https://registry.npmjs.org/@jup-ag/cykura-sdk/-/cykura-sdk-0.1.25.tgz"
@@ -4720,14 +4708,6 @@
bignumber.js "^9.1.0"
bn.js "^5.2.0"
-"@jup-ag/dradex-idl@0.2.1":
- version "0.2.1"
- resolved "https://registry.npmjs.org/@jup-ag/dradex-idl/-/dradex-idl-0.2.1.tgz"
- integrity sha512-CZ5GZTLExy1+fw/tFOo6C4AbU0o/PcqJxxQpDp5UkSJ0SXbz7ZGMz9DfKu+htJuAwxwGgS/rbQfeBoU9fhDXuQ==
- dependencies:
- "@solana/buffer-layout" "4.0.0"
- bn.js "5.2.1"
-
"@jup-ag/dradex-sdk@0.2.3":
version "0.2.3"
resolved "https://registry.npmjs.org/@jup-ag/dradex-sdk/-/dradex-sdk-0.2.3.tgz"
@@ -4840,6 +4820,16 @@
promise-retry "2.0.1"
superstruct "~1.0.3"
+"@jup-ag/referral-sdk@^0.1.7":
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/@jup-ag/referral-sdk/-/referral-sdk-0.1.7.tgz#c3e172e2b5e127d26a7b103bb2b6aa04679edaa1"
+ integrity sha512-Y+JdmeyTW6NkgbTUADHdGFVAtyKRnKTGjW0+aDehDHBR4m+xEV3l8cblQsNvRqkHmy6CySNm/nDE7btHKO75SA==
+ dependencies:
+ "@coral-xyz/anchor" "0.28.1-beta.2"
+ "@solana/spl-token" "0.3.8"
+ "@solana/web3.js" "^1.77.3"
+ lodash "^4.17.21"
+
"@jup-ag/whirlpools-sdk@0.7.2":
version "0.7.2"
resolved "https://registry.npmjs.org/@jup-ag/whirlpools-sdk/-/whirlpools-sdk-0.7.2.tgz"
@@ -9309,6 +9299,15 @@
"@solana/buffer-layout-utils" "^0.2.0"
buffer "^6.0.3"
+"@solana/spl-token@0.3.8":
+ version "0.3.8"
+ resolved "https://registry.yarnpkg.com/@solana/spl-token/-/spl-token-0.3.8.tgz#8e9515ea876e40a4cc1040af865f61fc51d27edf"
+ integrity sha512-ogwGDcunP9Lkj+9CODOWMiVJEdRtqHAtX2rWF62KxnnSWtMZtV9rDhTrZFshiyJmxDnRL/1nKE1yJHg4jjs3gg==
+ dependencies:
+ "@solana/buffer-layout" "^4.0.0"
+ "@solana/buffer-layout-utils" "^0.2.0"
+ buffer "^6.0.3"
+
"@solana/spl-token@0.3.9":
version "0.3.9"
resolved "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.3.9.tgz"
@@ -9329,7 +9328,7 @@
"@solana/spl-token-metadata" "^0.1.4"
buffer "^6.0.3"
-"@solana/spl-token@^0.2.0":
+"@solana/spl-token@^0.2.0", "spl2@npm:@solana/spl-token@^0.2.0":
version "0.2.0"
resolved "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.2.0.tgz"
integrity sha512-RWcn31OXtdqIxmkzQfB2R+WpsJOVS6rKuvpxJFjvik2LyODd+WN58ZP3Rpjpro03fscGAkzlFuP3r42doRJgyQ==
@@ -9871,7 +9870,7 @@
rpc-websockets "^9.0.0"
superstruct "^1.0.4"
-"@solana/web3.js@^1.54.0", "@solana/web3.js@^1.93.0", "@solana/web3.js@^1.95.0":
+"@solana/web3.js@^1.54.0", "@solana/web3.js@^1.77.3", "@solana/web3.js@^1.93.0", "@solana/web3.js@^1.95.0":
version "1.95.3"
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.95.3.tgz#70b5f4d76823f56b5af6403da51125fffeb65ff3"
integrity sha512-O6rPUN0w2fkNqx/Z3QJMB9L225Ex10PRDH8bTaIUPZXMPV0QP8ZpPvjQnXK+upUczlRgzHzd6SjKIha1p+I6og==
@@ -27216,16 +27215,6 @@ spdy@^4.0.2:
select-hose "^2.0.0"
spdy-transport "^3.0.0"
-"spl2@npm:@solana/spl-token@^0.2.0":
- version "0.2.0"
- resolved "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.2.0.tgz"
- 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"
-
split-on-first@^1.0.0:
version "1.1.0"
resolved "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz"
@@ -27432,7 +27421,7 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"
-"string-width-cjs@npm:string-width@^4.2.0":
+"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -27450,15 +27439,6 @@ string-width@^3.0.0, string-width@^3.1.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
-string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
- version "4.2.3"
- resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
- dependencies:
- emoji-regex "^8.0.0"
- is-fullwidth-code-point "^3.0.0"
- strip-ansi "^6.0.1"
-
string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2"
resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz"
@@ -27553,7 +27533,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"
-"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
+"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -27567,13 +27547,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"
-strip-ansi@^6.0.0, strip-ansi@^6.0.1:
- version "6.0.1"
- resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
- dependencies:
- ansi-regex "^5.0.1"
-
strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz"
@@ -29952,7 +29925,7 @@ workbox-window@6.6.1, workbox-window@^6.5.4:
"@types/trusted-types" "^2.0.2"
workbox-core "6.6.1"
-"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
+"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -29979,15 +29952,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"
-wrap-ansi@^7.0.0:
- version "7.0.0"
- resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
- dependencies:
- ansi-styles "^4.0.0"
- string-width "^4.1.0"
- strip-ansi "^6.0.0"
-
wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz"