This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import AmmImpl, { MAINNET_POOL } from "@mercurial-finance/dynamic-amm-sdk"; | |
| import { Connection, Keypair, PublicKey } from "@solana/web3.js"; | |
| import { Wallet, AnchorProvider } from "@project-serum/anchor"; | |
| import { TokenListProvider } from "@solana/spl-token-registry"; | |
| import Decimal from "decimal.js"; | |
| interface JupPriceResponse { | |
| data: { | |
| [address: string]: { | |
| id: String; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import VaultImpl from "@meteora-ag/vault-sdk"; | |
| import { Mint, unpackMint } from "@solana/spl-token"; | |
| import { clusterApiUrl, Connection, PublicKey } from "@solana/web3.js"; | |
| const connection = new Connection(clusterApiUrl("mainnet-beta"), "confirmed"); | |
| const keeperBaseUrl = "https://merv2-api.meteora.ag"; | |
| const lendingProgramIdsToName = new Map<string, string>([ | |
| ["MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA", "MarginFi"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import DLMM, { StrategyType } from "@meteora-ag/dlmm"; | |
| import { clusterApiUrl, Connection, Keypair, PublicKey } from "@solana/web3.js"; | |
| import BN from "bn.js"; | |
| import fs from "fs"; | |
| import os from "os"; | |
| const privateKeyFilepath = `${os.homedir()}/.config/solana/mainnet.json`; | |
| const rawPrivateKey = fs.readFileSync(privateKeyFilepath, "utf-8"); | |
| const payer = Keypair.fromSecretKey(new Uint8Array(JSON.parse(rawPrivateKey))); |
OlderNewer