diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..d663169 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,40 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint", "prettier"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "prettier" + ], + "rules": { + "prettier/prettier": "error", + "no-constant-condition": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], + "no-console": ["warn", { "allow": ["warn", "error"] }], + "curly": ["error", "all"], + "eqeqeq": ["error", "always"], + "no-floating-decimal": "error", + "no-var": "error", + "prefer-const": "error" + }, + "env": { + "browser": true, + "node": true, + "es6": true + }, + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + }, + "overrides": [ + { + "files": ["test/**/*", "src/utils/keypair.ts"], + "rules": { + "no-console": "off" + } + } + ] +} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..dfb631f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +dist +node_modules +docs +*.md \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..9928a2d --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "semi": true, + "trailingComma": "all", + "singleQuote": false, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "arrowParens": "always", + "endOfLine": "lf", + "bracketSameLine": false +} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 261eeb9..e6df5e1 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright [2024] [SendAI] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 7d49bc6..f56e1f3 100644 --- a/README.md +++ b/README.md @@ -183,60 +183,14 @@ import { PublicKey } from "@solana/web3.js"; ### Fetch Price Data from Pyth ```typescript -import { pythFetchPrice } from "solana-agent-kit"; -const price = await pythFetchPrice( - agent, +const price = await agent.pythFetchPrice( "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43" ); console.log("Price in BTC/USD:", price); ``` -## API Reference - -### Core Functions - -#### `deploy_token(agent, decimals?, name, uri, symbol, initialSupply?)` - -Deploy a new SPL token with optional initial supply. If not specified, decimals default to 9. - -#### `deploy_collection(agent, options)` - -Create a new NFT collection with customizable metadata and royalties. - -#### `mintCollectionNFT(agent, collectionMint, metadata, recipient?)` - -Mint a new NFT as part of an existing collection. - -#### `transfer(agent, to, amount, mint?)` - -Transfer SOL or SPL tokens to a recipient. - -#### `trade(agent, outputMint, inputAmount, inputMint?, slippageBps?)` - -Swap tokens using Jupiter Exchange integration. - -#### `get_balance(agent, token_address)` - -Check SOL or token balance for the agent's wallet. - -#### `lendAsset(agent, assetMint, amount, apiKey)` - -Lend idle assets to earn interest with Lulo. - -#### `stakeWithJup(agent, amount)` - -Stake SOL with Jupiter to earn rewards. - -#### `sendCompressedAirdrop(agent, mintAddress, amount, recipients, priorityFeeInLamports?, shouldLog?)` - -Send an SPL token airdrop to many recipients at low cost via ZK Compression. - -#### `pythFetchPrice(agent, priceFeedID)` - -Fetch price data from Pyth's Hermes service. - ## Dependencies The toolkit relies on several key Solana and Metaplex libraries: diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 73cf8f1..bcaae4e 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE4XTQUvDMBTA8e+Sc7E4dEhvw9KDzm1ob+IhxNc1LH0vJC+gyL67bBNdXfZ26SX//l4T0tcvxfDBqlIv5DTq2RqQHy2rQnnNvaqUcTpGiOV4/arnwalCbSy+q+p6crctfqV7cg4MW8IavKPPAfDIs8gQOm0glrlwDE9up1l46XfPeEH9qUQygGYKeeiwJr3eAJt+FayBZ4ieMEJWOs0k9CF5yxBa2gDWmnWW/B9J4Dw5mhlDCbkG1tZF8WvP59KQJ4v8d/SLphVnnK2lEas0+C7hXCc0vchny0t0k3B/nNLlynQSa3ZXCA6/TkvkjtAu4X7vsTyJxuL0Zvv2DYU9ByOnAwAA" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE42TwU7DMAyG3yXniooJJtTbRNUDDJigN8QhCi6JltpR40hMaO+OtiFYWebtkos/f7asP69fiuGTVaVeyGvUsw9AvnesChU0W1Up43WMEMtx/cJy71Whlg7fVXU5uVkXv6Zb8h4MO8IagqdVD7jnc8gwdNpALHPgWDy5nmbFT2HzxhPWH0pUDqCZhrxoV5PaG2BjF4Mz8AwxEEbImg4xSXqXgmMYWloC1pp1VvkfkoTz5GlmDCXkGlg7H8Vtj+PSkAeH/Hf6x6YVZxylpRGL1Icu4VwnNFbUZ8lT6ibh9pxSuDKcqF2xPTMjeVSSm00+YfcvWyK/t3GXcHvYWB5AY+P0av32DUTvPWMEBAAA" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 0bcb10d..b0786c5 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,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"; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,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"; \ No newline at end of file diff --git a/docs/classes/SolanaAgentKit.html b/docs/classes/SolanaAgentKit.html index b767597..eccbc8c 100644 --- a/docs/classes/SolanaAgentKit.html +++ b/docs/classes/SolanaAgentKit.html @@ -1,7 +1,7 @@ SolanaAgentKit | solana-agent-kit

Class SolanaAgentKit

Main class for interacting with Solana blockchain -Provides a unified interface for token operations, NFT management, and trading

+Provides a unified interface for token operations, NFT management, trading and more

SolanaAgentKit

-

Constructors

Constructors

  • Parameters

    • private_key: string
    • rpc_url: string = "https://api.mainnet-beta.solana.com"
    • openai_api_key: string

    Returns SolanaAgentKit

Properties

connection: Connection

Solana RPC connection

-
openai_api_key: string
wallet: Keypair

Wallet keypair for signing transactions

-
wallet_address: PublicKey

Public key of the wallet

-

Methods

  • Parameters

    • depositTokenAmount: BN
    • depositTokenMint: PublicKey
    • otherTokenMint: PublicKey
    • initialPrice: Decimal
    • maxPrice: Decimal
    • feeTier:
          | 0.01
          | 0.02
          | 0.04
          | 0.05
          | 0.16
          | 0.3
          | 0.65
          | 1
          | 2

    Returns Promise<string>

  • Parameters

    • name: string
    • uri: string
    • symbol: string
    • decimals: number = DEFAULT_OPTIONS.TOKEN_DECIMALS
    • OptionalinitialSupply: number

    Returns Promise<{
        mint: PublicKey;
    }>

  • Parameters

    • Optionaltoken_address: PublicKey

    Returns Promise<null | number>

  • Parameters

    • account: PublicKey

    Returns Promise<string>

  • Parameters

    • tokenName: string
    • tokenTicker: string
    • description: string
    • imageUrl: string
    • Optionaloptions: PumpFunTokenOptions

    Returns Promise<{
        metadataUri: any;
        mint: string;
        signature: string;
    }>

  • Parameters

    • amount: number

    Returns Promise<string>

  • Parameters

    • collectionMint: PublicKey
    • metadata: {
          creators?: {
              address: string;
              share: number;
          }[];
          name: string;
          sellerFeeBasisPoints?: number;
          uri: string;
      }
      • Optionalcreators?: {
            address: string;
            share: number;
        }[]
      • name: string
      • OptionalsellerFeeBasisPoints?: number
      • uri: string
    • Optionalrecipient: PublicKey

    Returns Promise<MintCollectionNFTResponse>

  • Parameters

    • baseMint: PublicKey
    • quoteMint: PublicKey
    • lotSize: number = 1
    • tickSize: number = 0.01

    Returns Promise<string[]>

  • Parameters

    • marketId: PublicKey
    • baseAmount: BN
    • quoteAmount: BN
    • startTime: BN

    Returns Promise<string>

  • Parameters

    • mint1: PublicKey
    • mint2: PublicKey
    • configId: PublicKey
    • initialPrice: Decimal
    • startTime: BN

    Returns Promise<string>

  • Parameters

    • mint1: PublicKey
    • mint2: PublicKey
    • configId: PublicKey
    • mintAAmount: BN
    • mintBAmount: BN
    • startTime: BN

    Returns Promise<string>

  • Parameters

    • name: string
    • OptionalspaceKB: number

    Returns Promise<string>

  • Returns Promise<string>

  • Parameters

    • domain: string

    Returns Promise<PublicKey>

  • Parameters

    • mintAddress: string
    • amount: number
    • decimals: number
    • recipients: string[]
    • priorityFeeInLamports: number
    • shouldLog: boolean

    Returns Promise<string[]>

  • Parameters

    • amount: number

    Returns Promise<string>

  • Parameters

    • outputMint: PublicKey
    • inputAmount: number
    • OptionalinputMint: PublicKey
    • slippageBps: number = DEFAULT_OPTIONS.SLIPPAGE_BPS

    Returns Promise<string>

  • Parameters

    • to: PublicKey
    • amount: number
    • Optionalmint: PublicKey

    Returns Promise<string>

+

Constructors

  • Parameters

    • private_key: string
    • rpc_url: string = "https://api.mainnet-beta.solana.com"
    • openai_api_key: string

    Returns SolanaAgentKit

Properties

connection: Connection

Solana RPC connection

+
openai_api_key: string
wallet: Keypair

Wallet keypair for signing transactions

+
wallet_address: PublicKey

Public key of the wallet

+

Methods

  • Parameters

    • depositTokenAmount: BN
    • depositTokenMint: PublicKey
    • otherTokenMint: PublicKey
    • initialPrice: Decimal
    • maxPrice: Decimal
    • feeTier:
          | 0.01
          | 0.02
          | 0.04
          | 0.05
          | 0.16
          | 0.3
          | 0.65
          | 1
          | 2

    Returns Promise<string>

  • Parameters

    • name: string
    • uri: string
    • symbol: string
    • decimals: number = DEFAULT_OPTIONS.TOKEN_DECIMALS
    • OptionalinitialSupply: number

    Returns Promise<{
        mint: PublicKey;
    }>

  • Parameters

    • mint: string

    Returns Promise<string>

  • Returns Promise<String[]>

  • Returns Promise<string[]>

  • Parameters

    • Optionaltoken_address: PublicKey

    Returns Promise<number>

  • Parameters

    • owner: PublicKey

    Returns Promise<null | string>

  • Parameters

    • owner: PublicKey

    Returns Promise<string[]>

  • Parameters

    • tld: string

    Returns Promise<string[]>

  • Parameters

    • account: PublicKey

    Returns Promise<string>

  • Parameters

    • amount: number

    Returns Promise<string>

  • Parameters

    • collectionMint: PublicKey
    • metadata: {
          creators?: {
              address: string;
              share: number;
          }[];
          name: string;
          sellerFeeBasisPoints?: number;
          uri: string;
      }
      • Optionalcreators?: {
            address: string;
            share: number;
        }[]
      • name: string
      • OptionalsellerFeeBasisPoints?: number
      • uri: string
    • Optionalrecipient: PublicKey

    Returns Promise<MintCollectionNFTResponse>

  • Parameters

    • baseMint: PublicKey
    • quoteMint: PublicKey
    • lotSize: number = 1
    • tickSize: number = 0.01

    Returns Promise<string[]>

  • Parameters

    • priceFeedID: string

    Returns Promise<string>

  • Parameters

    • marketId: PublicKey
    • baseAmount: BN
    • quoteAmount: BN
    • startTime: BN

    Returns Promise<string>

  • Parameters

    • mint1: PublicKey
    • mint2: PublicKey
    • configId: PublicKey
    • initialPrice: Decimal
    • startTime: BN

    Returns Promise<string>

  • Parameters

    • mint1: PublicKey
    • mint2: PublicKey
    • configId: PublicKey
    • mintAAmount: BN
    • mintBAmount: BN
    • startTime: BN

    Returns Promise<string>

  • Parameters

    • name: string
    • OptionalspaceKB: number

    Returns Promise<string>

  • Returns Promise<string>

  • Parameters

    • domain: string

    Returns Promise<undefined | PublicKey>

  • Parameters

    • domain: string

    Returns Promise<PublicKey>

  • Parameters

    • mintAddress: string
    • amount: number
    • decimals: number
    • recipients: string[]
    • priorityFeeInLamports: number
    • shouldLog: boolean

    Returns Promise<string[]>

  • Parameters

    • amount: number

    Returns Promise<string>

  • Parameters

    • outputMint: PublicKey
    • inputAmount: number
    • OptionalinputMint: PublicKey
    • slippageBps: number = DEFAULT_OPTIONS.SLIPPAGE_BPS

    Returns Promise<string>

  • Parameters

    • to: PublicKey
    • amount: number
    • Optionalmint: PublicKey

    Returns Promise<string>

diff --git a/docs/functions/createSolanaTools.html b/docs/functions/createSolanaTools.html index ca5e484..e52f87a 100644 --- a/docs/functions/createSolanaTools.html +++ b/docs/functions/createSolanaTools.html @@ -1 +1 @@ -createSolanaTools | solana-agent-kit

Function createSolanaTools

  • Parameters

    Returns (
        | SolanaBalanceTool
        | SolanaTransferTool
        | SolanaDeployTokenTool
        | SolanaDeployCollectionTool
        | SolanaMintNFTTool
        | SolanaTradeTool
        | SolanaRequestFundsTool
        | SolanaRegisterDomainTool
        | SolanaResolveDomainTool
        | SolanaGetDomainTool
        | SolanaGetWalletAddressTool
        | SolanaPumpfunTokenLaunchTool
        | SolanaCreateImageTool
        | SolanaLendAssetTool
        | SolanaTPSCalculatorTool
        | SolanaStakeTool
        | SolanaFetchPriceTool
        | SolanaTokenDataTool
        | SolanaTokenDataByTickerTool
        | SolanaCompressedAirdropTool
        | SolanaCreateSingleSidedWhirlpoolTool
        | SolanaRaydiumCreateAmmV4
        | SolanaRaydiumCreateClmm
        | SolanaRaydiumCreateCpmm
        | SolanaOpenbookCreateMarket)[]

+createSolanaTools | solana-agent-kit

Function createSolanaTools

  • Parameters

    Returns (
        | SolanaBalanceTool
        | SolanaTransferTool
        | SolanaDeployTokenTool
        | SolanaDeployCollectionTool
        | SolanaMintNFTTool
        | SolanaTradeTool
        | SolanaRequestFundsTool
        | SolanaRegisterDomainTool
        | SolanaResolveDomainTool
        | SolanaGetDomainTool
        | SolanaGetWalletAddressTool
        | SolanaPumpfunTokenLaunchTool
        | SolanaCreateImageTool
        | SolanaLendAssetTool
        | SolanaTPSCalculatorTool
        | SolanaStakeTool
        | SolanaFetchPriceTool
        | SolanaTokenDataTool
        | SolanaTokenDataByTickerTool
        | SolanaCompressedAirdropTool
        | SolanaCreateSingleSidedWhirlpoolTool
        | SolanaRaydiumCreateAmmV4
        | SolanaRaydiumCreateClmm
        | SolanaRaydiumCreateCpmm
        | SolanaOpenbookCreateMarket
        | SolanaPythFetchPrice
        | SolanaResolveAllDomainsTool
        | SolanaGetOwnedDomains
        | SolanaGetOwnedTldDomains
        | SolanaGetAllTlds
        | SolanaGetMainDomain)[]

diff --git a/docs/index.html b/docs/index.html index e7acd0e..7dd0878 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,80 +1,115 @@ -solana-agent-kit

solana-agent-kit

Solana Agent Kit

A powerful toolkit for interacting with the Solana blockchain, providing easy-to-use functions for token operations, NFT management, and trading. Now integrated with LangChain for enhanced functionality.

-
    -
  • -

    🪙 Token Operations

    +solana-agent-kit

    solana-agent-kit

    +

    Solana Agent Kit

    +

    Solana Agent Kit Cover 1 (3)

    +

    An open-source toolkit for connecting AI agents to Solana protocols. Now, any agent, using any model can autonomously perform 15+ Solana actions:

      -
    • Deploy new SPL tokens
    • -
    • Transfer SOL and SPL tokens
    • -
    • Check token balances
    • +
    • Trade tokens
    • +
    • Launch new tokens
    • +
    • Lend assets
    • +
    • Send compressed airdrops
    • +
    • Execute blinks
    • +
    • Launch tokens on AMMs
    • +
    • And more...
    • +
    +

    Anyone - whether an SF-based AI researcher or a crypto-native builder - can bring their AI agents trained with any model and seamlessly integrate with Solana.

    +
      +
    • +

      Token Operations

      +
        +
      • Deploy SPL tokens by Metaplex
      • +
      • Transfer assets
      • +
      • Balance checks
      • Stake SOL
      • +
      • Zk compressed Airdrop by Light Protocol and Helius
    • -

      🖼️ NFT Management

      +

      NFT Management via Metaplex

        -
      • Deploy NFT collections
      • -
      • Mint NFTs to collections
      • -
      • Manage metadata and royalties
      • +
      • Collection deployment
      • +
      • NFT minting
      • +
      • Metadata management
      • +
      • Royalty configuration
    • -

      💱 Trading

      +

      DeFi Integration

        -
      • Integrated Jupiter Exchange support
      • -
      • Token swaps with customizable slippage
      • -
      • Direct routing options
      • +
      • Jupiter Exchange swaps
      • +
      • Launch on Pump via PumpPortal
      • +
      • Raydium pool creation (CPMM, CLMM, AMMv4)
      • +
      • Orca whirlpool integration
      • +
      • Meteora Dynamic AMM, DLMM Pool, and Alpga Vault
      • +
      • Openbook market creation
      • +
      • Register and Resolve SNS
      • +
      • Jito Bundles
    • -

      🏦 Yield Farming

      +

      Solana Blinks

        -
      • Lend idle assets to earn interest with Lulo
      • +
      • Lending by Lulo
      • +
      • Send Arcade Games
      • +
      • JupSOL staking
      • +
      +
    • +
    +
      +
    • +

      LangChain Integration

      +
        +
      • Ready-to-use LangChain tools for blockchain operations
      • +
      • Autonomous agent support with React framework
      • +
      • Memory management for persistent interactions
      • +
      • Streaming responses for real-time feedback
    • -

      🔗 LangChain Integration

      +

      Autonomous Modes

        -
      • Utilize LangChain tools for enhanced blockchain interactions
      • -
      • Access a suite of tools for balance checks, transfers, token deployments, and more
      • +
      • Interactive chat mode for guided operations
      • +
      • Autonomous mode for independent agent actions
      • +
      • Configurable action intervals
      • +
      • Built-in error handling and recovery
      • +
      +
    • +
    • +

      AI Tools

      +
        +
      • DALL-E integration for NFT artwork generation
      • +
      • Natural language processing for blockchain commands
      • +
      • Price feed integration for market analysis
      • +
      • Automated decision-making capabilities
    -
    npm install solana-agent-kit
    +
    npm install solana-agent-kit
     
    import { SolanaAgentKit, createSolanaTools } from "solana-agent-kit";

    // Initialize with private key and optional RPC URL
    const agent = new SolanaAgentKit(
    "your-wallet-private-key-as-base58",
    "https://api.mainnet-beta.solana.com",
    "your-openai-api-key"
    );

    // Create LangChain tools
    const tools = createSolanaTools(agent);
    -
    import { deploy_token } from "solana-agent-kit";

    const result = await deploy_token(
    agent,
    9, // decimals
    1000000 // initial supply
    );

    console.log("Token Mint Address:", result.mint.toString()); +
    const result = await agent.deployToken(
    "my ai token", // name
    "uri", // uri
    "token", // symbol
    9, // decimals
    1000000 // initial supply
    );

    console.log("Token Mint Address:", result.mint.toString());
    -
    import { deploy_collection } from "solana-agent-kit";

    const collection = await deploy_collection(agent, {
    name: "My NFT Collection",
    uri: "https://arweave.net/metadata.json",
    royaltyBasisPoints: 500, // 5%
    creators: [
    {
    address: "creator-wallet-address",
    percentage: 100,
    },
    ],
    }); +
    const collection = await agent.deployCollection({
    name: "My NFT Collection",
    uri: "https://arweave.net/metadata.json",
    royaltyBasisPoints: 500, // 5%
    creators: [
    {
    address: "creator-wallet-address",
    percentage: 100,
    },
    ],
    });
    -
    import { trade } from "solana-agent-kit";
    import { PublicKey } from "@solana/web3.js";

    const signature = await trade(
    agent,
    new PublicKey("target-token-mint"),
    100, // amount
    new PublicKey("source-token-mint"),
    300 // 3% slippage
    ); +
    import { PublicKey } from "@solana/web3.js";

    const signature = await agent.trade(
    new PublicKey("target-token-mint"),
    100, // amount
    new PublicKey("source-token-mint"),
    300 // 3% slippage
    );
    -
    import { lendAsset } from "solana-agent-kit";
    import { PublicKey } from "@solana/web3.js";

    const signature = await lendAsset(
    agent,
    100 // amount
    ); +
    import { PublicKey } from "@solana/web3.js";

    const signature = await agent.lendAssets(
    100 // amount of USDC to lend
    );
    -
    import { stakeWithJup } from "solana-agent-kit";

    const signature = await stakeWithJup(
    agent,
    1 // amount in SOL
    ); +
    const signature = await agent.stake(
    1 // amount in SOL to stake
    );
    -
    import { fetchPrice } from "solana-agent-kit";

    const price = await fetchPrice(
    agent,
    "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN" // Token mint address
    );

    console.log("Price in USDC:", price); +
    import { PublicKey } from "@solana/web3.js";

    (async () => {
    console.log(
    "~Airdrop cost estimate:",
    getAirdropCostEstimate(
    1000, // recipients
    30_000 // priority fee in lamports
    )
    );

    const signature = await agent.sendCompressedAirdrop(
    new PublicKey("JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"), // mint
    42, // amount per recipient
    [
    new PublicKey("1nc1nerator11111111111111111111111111111111"),
    // ... add more recipients
    ],
    30_000 // priority fee in lamports
    );
    })();
    -
    import {
    sendCompressedAirdrop,
    getAirdropCostEstimate,
    } from "solana-agent-kit";
    import { PublicKey } from "@solana/web3.js";

    (async () => {
    console.log(
    "~Airdrop cost estimate:",
    getAirdropCostEstimate(
    1000, // recipients
    30_000 // priority fee in lamports
    )
    );

    const signature = await sendCompressedAirdrop(
    agent,
    new PublicKey("JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"), // mint
    42, // amount per recipient
    [
    new PublicKey("1nc1nerator11111111111111111111111111111111"),
    // ... add more recipients
    ],
    30_000 // priority fee in lamports
    );
    })(); +

    const price = await agent.pythFetchPrice(
    "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
    );

    console.log("Price in BTC/USD:", price);
    -

    Deploy a new SPL token with optional initial supply. If not specified, decimals default to 9.

    -

    Create a new NFT collection with customizable metadata and royalties.

    -

    Mint a new NFT as part of an existing collection.

    -

    Transfer SOL or SPL tokens to a recipient.

    -

    Swap tokens using Jupiter Exchange integration.

    -

    Check SOL or token balance for the agent's wallet.

    -

    Lend idle assets to earn interest with Lulo.

    -

    Stake SOL with Jupiter to earn rewards.

    -

    Send an SPL token airdrop to many recipients at low cost via ZK Compression.

    The toolkit relies on several key Solana and Metaplex libraries:

    • @solana/web3.js
    • @@ -84,8 +119,10 @@
    • @metaplex-foundation/umi
    • @lightprotocol/compressed-token
    • @lightprotocol/stateless.js
    • +
    • @pythnetwork/price-service-client
    -

    Contributions are welcome! Please feel free to submit a Pull Request.

    -

    ISC License

    +

    Contributions are welcome! Please feel free to submit a Pull Request. +Refer to CONTRIBUTING.md for detailed guidelines on how to contribute to this project.

    +

    MIT License

    This toolkit handles private keys and transactions. Always ensure you're using it in a secure environment and never share your private keys.

    -
    +
diff --git a/docs/interfaces/CollectionDeployment.html b/docs/interfaces/CollectionDeployment.html index 0438e92..c03b39a 100644 --- a/docs/interfaces/CollectionDeployment.html +++ b/docs/interfaces/CollectionDeployment.html @@ -1,3 +1,3 @@ -CollectionDeployment | solana-agent-kit

Interface CollectionDeployment

interface CollectionDeployment {
    collectionAddress: PublicKey;
    signature: Uint8Array<ArrayBufferLike>;
}

Properties

collectionAddress +CollectionDeployment | solana-agent-kit

Interface CollectionDeployment

interface CollectionDeployment {
    collectionAddress: PublicKey;
    signature: Uint8Array<ArrayBufferLike>;
}

Properties

collectionAddress: PublicKey
signature: Uint8Array<ArrayBufferLike>
+

Properties

collectionAddress: PublicKey
signature: Uint8Array<ArrayBufferLike>
diff --git a/docs/interfaces/CollectionOptions.html b/docs/interfaces/CollectionOptions.html index 997e32b..6790105 100644 --- a/docs/interfaces/CollectionOptions.html +++ b/docs/interfaces/CollectionOptions.html @@ -1,5 +1,5 @@ -CollectionOptions | solana-agent-kit

Interface CollectionOptions

interface CollectionOptions {
    creators?: Creator[];
    name: string;
    royaltyBasisPoints?: number;
    uri: string;
}

Properties

creators? +CollectionOptions | solana-agent-kit

Interface CollectionOptions

interface CollectionOptions {
    creators?: Creator[];
    name: string;
    royaltyBasisPoints?: number;
    uri: string;
}

Properties

creators?: Creator[]
name: string
royaltyBasisPoints?: number
uri: string
+

Properties

creators?: Creator[]
name: string
royaltyBasisPoints?: number
uri: string
diff --git a/docs/interfaces/Creator.html b/docs/interfaces/Creator.html index 72a3136..4e33592 100644 --- a/docs/interfaces/Creator.html +++ b/docs/interfaces/Creator.html @@ -1,3 +1,3 @@ -Creator | solana-agent-kit

Interface Creator

interface Creator {
    address: string;
    percentage: number;
}

Properties

address +Creator | solana-agent-kit

Interface Creator

interface Creator {
    address: string;
    percentage: number;
}

Properties

Properties

address: string
percentage: number
+

Properties

address: string
percentage: number
diff --git a/docs/interfaces/FetchPriceResponse.html b/docs/interfaces/FetchPriceResponse.html index f2ffea8..defd401 100644 --- a/docs/interfaces/FetchPriceResponse.html +++ b/docs/interfaces/FetchPriceResponse.html @@ -1,6 +1,6 @@ -FetchPriceResponse | solana-agent-kit

Interface FetchPriceResponse

interface FetchPriceResponse {
    code?: string;
    message?: string;
    priceInUSDC?: string;
    status: "success" | "error";
    tokenId?: string;
}

Properties

code? +FetchPriceResponse | solana-agent-kit

Interface FetchPriceResponse

interface FetchPriceResponse {
    code?: string;
    message?: string;
    priceInUSDC?: string;
    status: "success" | "error";
    tokenId?: string;
}

Properties

code?: string
message?: string
priceInUSDC?: string
status: "success" | "error"
tokenId?: string
+

Properties

code?: string
message?: string
priceInUSDC?: string
status: "success" | "error"
tokenId?: string
diff --git a/docs/interfaces/JupiterTokenData.html b/docs/interfaces/JupiterTokenData.html index 1fbabda..2b23375 100644 --- a/docs/interfaces/JupiterTokenData.html +++ b/docs/interfaces/JupiterTokenData.html @@ -1,4 +1,4 @@ -JupiterTokenData | solana-agent-kit

Interface JupiterTokenData

interface JupiterTokenData {
    address: string;
    daily_volume: number;
    decimals: number;
    extensions: {
        coingeckoId?: string;
    };
    freeze_authority: null | string;
    logoURI: string;
    mint_authority: null | string;
    name: string;
    permanent_delegate: null | string;
    symbol: string;
    tags: string[];
}

Properties

address +JupiterTokenData | solana-agent-kit

Interface JupiterTokenData

interface JupiterTokenData {
    address: string;
    daily_volume: number;
    decimals: number;
    extensions: {
        coingeckoId?: string;
    };
    freeze_authority: null | string;
    logoURI: string;
    mint_authority: null | string;
    name: string;
    permanent_delegate: null | string;
    symbol: string;
    tags: string[];
}

Properties

address: string
daily_volume: number
decimals: number
extensions: {
    coingeckoId?: string;
}
freeze_authority: null | string
logoURI: string
mint_authority: null | string
name: string
permanent_delegate: null | string
symbol: string
tags: string[]
+

Properties

address: string
daily_volume: number
decimals: number
extensions: {
    coingeckoId?: string;
}
freeze_authority: null | string
logoURI: string
mint_authority: null | string
name: string
permanent_delegate: null | string
symbol: string
tags: string[]
diff --git a/docs/interfaces/LuloAccountDetailsResponse.html b/docs/interfaces/LuloAccountDetailsResponse.html index 0aafae9..fa19d62 100644 --- a/docs/interfaces/LuloAccountDetailsResponse.html +++ b/docs/interfaces/LuloAccountDetailsResponse.html @@ -1,6 +1,6 @@ LuloAccountDetailsResponse | solana-agent-kit

Interface LuloAccountDetailsResponse

Lulo Account Details response format

-
interface LuloAccountDetailsResponse {
    interestEarned: number;
    realtimeApy: number;
    settings: {
        allowedProtocols: null | string;
        homebase: null | string;
        minimumRate: string;
        owner: string;
    };
    totalValue: number;
}

Properties

interface LuloAccountDetailsResponse {
    interestEarned: number;
    realtimeApy: number;
    settings: {
        allowedProtocols: null | string;
        homebase: null | string;
        minimumRate: string;
        owner: string;
    };
    totalValue: number;
}

Properties

interestEarned: number
realtimeApy: number
settings: {
    allowedProtocols: null | string;
    homebase: null | string;
    minimumRate: string;
    owner: string;
}
totalValue: number
+

Properties

interestEarned: number
realtimeApy: number
settings: {
    allowedProtocols: null | string;
    homebase: null | string;
    minimumRate: string;
    owner: string;
}
totalValue: number
diff --git a/docs/interfaces/MintCollectionNFTResponse.html b/docs/interfaces/MintCollectionNFTResponse.html index 4c85a86..e2e1479 100644 --- a/docs/interfaces/MintCollectionNFTResponse.html +++ b/docs/interfaces/MintCollectionNFTResponse.html @@ -1,3 +1,3 @@ -MintCollectionNFTResponse | solana-agent-kit

Interface MintCollectionNFTResponse

interface MintCollectionNFTResponse {
    metadata: PublicKey;
    mint: PublicKey;
}

Properties

metadata +MintCollectionNFTResponse | solana-agent-kit

Interface MintCollectionNFTResponse

interface MintCollectionNFTResponse {
    metadata: PublicKey;
    mint: PublicKey;
}

Properties

Properties

metadata: PublicKey
mint: PublicKey
+

Properties

metadata: PublicKey
mint: PublicKey
diff --git a/docs/interfaces/PumpFunTokenOptions.html b/docs/interfaces/PumpFunTokenOptions.html index d904b0c..d1c0142 100644 --- a/docs/interfaces/PumpFunTokenOptions.html +++ b/docs/interfaces/PumpFunTokenOptions.html @@ -1,7 +1,7 @@ -PumpFunTokenOptions | solana-agent-kit

Interface PumpFunTokenOptions

interface PumpFunTokenOptions {
    initialLiquiditySOL?: number;
    priorityFee?: number;
    slippageBps?: number;
    telegram?: string;
    twitter?: string;
    website?: string;
}

Properties

initialLiquiditySOL? +PumpFunTokenOptions | solana-agent-kit

Interface PumpFunTokenOptions

interface PumpFunTokenOptions {
    initialLiquiditySOL?: number;
    priorityFee?: number;
    slippageBps?: number;
    telegram?: string;
    twitter?: string;
    website?: string;
}

Properties

initialLiquiditySOL?: number
priorityFee?: number
slippageBps?: number
telegram?: string
twitter?: string
website?: string
+

Properties

initialLiquiditySOL?: number
priorityFee?: number
slippageBps?: number
telegram?: string
twitter?: string
website?: string
diff --git a/docs/interfaces/PumpfunLaunchResponse.html b/docs/interfaces/PumpfunLaunchResponse.html index 7e65f2a..f667de7 100644 --- a/docs/interfaces/PumpfunLaunchResponse.html +++ b/docs/interfaces/PumpfunLaunchResponse.html @@ -1,5 +1,5 @@ -PumpfunLaunchResponse | solana-agent-kit

Interface PumpfunLaunchResponse

interface PumpfunLaunchResponse {
    error?: string;
    metadataUri?: string;
    mint: string;
    signature: string;
}

Properties

error? +PumpfunLaunchResponse | solana-agent-kit

Interface PumpfunLaunchResponse

interface PumpfunLaunchResponse {
    error?: string;
    metadataUri?: string;
    mint: string;
    signature: string;
}

Properties

error?: string
metadataUri?: string
mint: string
signature: string
+

Properties

error?: string
metadataUri?: string
mint: string
signature: string
diff --git a/docs/interfaces/PythFetchPriceResponse.html b/docs/interfaces/PythFetchPriceResponse.html new file mode 100644 index 0000000..fcfb217 --- /dev/null +++ b/docs/interfaces/PythFetchPriceResponse.html @@ -0,0 +1,6 @@ +PythFetchPriceResponse | solana-agent-kit

Interface PythFetchPriceResponse

interface PythFetchPriceResponse {
    code?: string;
    message?: string;
    price?: string;
    priceFeedID: string;
    status: "success" | "error";
}

Properties

code?: string
message?: string
price?: string
priceFeedID: string
status: "success" | "error"
diff --git a/docs/media/CONTRIBUTING.md b/docs/media/CONTRIBUTING.md new file mode 100644 index 0000000..9cc1837 --- /dev/null +++ b/docs/media/CONTRIBUTING.md @@ -0,0 +1,154 @@ +# Contributing to Solana Agent Kit + +First off, thank you for considering contributing to Solana Agent Kit! 🎉 Your contributions are **greatly appreciated**. + +## Table of Contents + +- [Contributing to Solana Agent Kit](#contributing-to-solana-agent-kit) + - [Table of Contents](#table-of-contents) + - [Code of Conduct](#code-of-conduct) + - [How Can I Contribute?](#how-can-i-contribute) + - [Reporting Bugs](#reporting-bugs) + - [Suggesting Enhancements](#suggesting-enhancements) + - [Your First Code Contribution](#your-first-code-contribution) + - [Pull Requests](#pull-requests) + - [Style Guides](#style-guides) + - [Code Style](#code-style) + - [Commit Messages](#commit-messages) + - [Naming Conventions](#naming-conventions) + - [Development Setup](#development-setup) + - [Prerequisites](#prerequisites) + - [Installation](#installation) + - [Building the Project](#building-the-project) + - [Running Tests](#running-tests) + - [Generating Documentation](#generating-documentation) + - [Security](#security) + - [License](#license) + +## Code of Conduct + +This project adheres to the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). By participating, you are expected to uphold this code. Please report unacceptable behavior to [aryan@sendai.fun](mailto:aryan@sendai.fun). + +## How Can I Contribute? + +### Reporting Bugs + +**Great**! Opening an issue is the best way to help us improve. Here's how you can report a bug: + +1. **Search** the [existing issues](https://github.com/sendaifun/solana-agent-kit/issues) to make sure it hasn't been reported. +2. **Open a new issue** and fill out the template with as much information as possible. +3. **Provide reproduction steps** if applicable. + +### Suggesting Enhancements + +We welcome your ideas for improving Solana Agent Kit! To suggest an enhancement: + +1. **Search** the [existing issues](https://github.com/sendaifun/solana-agent-kit/issues) to see if it's already been suggested. +2. **Open a new issue** and describe your idea in detail. + +### Your First Code Contribution + +Unsure where to start? You can help out by: + +- Fixing simple bugs. +- Improving documentation. +- Adding tests. + +Check out the [Good First Issues](https://github.com/sendaifun/solana-agent-kit/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) to get started! + +### Pull Requests + +1. **Fork** the repository. +2. **Create** a new branch for your feature or bugfix. + ```bash + git checkout -b feature/your-feature-name + ``` +3. **Commit** your changes with clear and descriptive messages. +4. **Push** to your fork. + ```bash + git push origin feature/your-feature-name + ``` +5. **Open a Pull Request** against the `main` branch of this repository. + +## Style Guides + +### Code Style + +- **Language**: TypeScript +- **Formatting**: Follow the existing codebase formatting. Consider using [Prettier](https://prettier.io/) for consistent code formatting. +- **Code Quality**: Adhere to the code quality rules defined in `.eslintrc`. Ensure all checks pass before submitting a PR. + +### Commit Messages + +Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for your commit messages. Examples: + +- `feat: add ability to deploy new SPL token` +- `fix: handle edge case when deploying collection` +- `docs: update README with new usage examples` + +### Naming Conventions + +- **Variables and Functions**: `camelCase` +- **Classes and Types**: `PascalCase` +- **Constants**: `UPPER_SNAKE_CASE` + +## Development Setup + +### Prerequisites + +- **Node.js**: v23.x or higher +- **npm**: v10.x or higher +- **Git**: Installed and configured + +### Installation + +1. **Clone** the repository: + ```bash + git clone https://github.com/yourusername/solana-agent-kit.git + ``` +2. **Navigate** to the project directory: + ```bash + cd solana-agent-kit + ``` +3. **Install** dependencies: + ```bash + pnpm install + ``` + +### Building the Project + +To compile the TypeScript code: + +```bash +pnpm run build +``` + +### Running Tests + +To execute the test suite: + +```bash +pnpm run test +``` + +### Generating Documentation + +To generate the project documentation using TypeDoc: + +```bash +npm run docs +``` + +The documentation will be available in the `docs/` directory. + +## Security + +This toolkit handles sensitive information such as private keys and API keys. **Ensure you never commit `.env` files or any sensitive data**. Review the `.gitignore` to confirm that sensitive files are excluded. + +For security vulnerabilities, please follow the [responsible disclosure](mailto:aryan@sendai.fun) process. + +## License + +This project is licensed under the [ISC License](LICENSE). + +--- diff --git a/docs/modules.html b/docs/modules.html index b5e59c9..29440e3 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -8,5 +8,6 @@ MintCollectionNFTResponse PumpfunLaunchResponse PumpFunTokenOptions +PythFetchPriceResponse

Functions

diff --git a/guides/add_your_own_tool.md b/guides/add_your_own_tool.md index 803198c..6c41606 100644 --- a/guides/add_your_own_tool.md +++ b/guides/add_your_own_tool.md @@ -178,4 +178,4 @@ If you encounter any issues while implementing your custom tool: - Contact the maintainer - Check existing tools for implementation examples ---- \ No newline at end of file +--- diff --git a/package.json b/package.json index 790b80c..7cb163c 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,18 @@ "build": "tsc", "docs": "typedoc src --out docs", "test": "ts-node test/index.ts", - "generate": "ts-node src/utils/keypair.ts" + "generate": "ts-node src/utils/keypair.ts", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"" }, "engines": { "node": ">=23.1.0", "pnpm": ">=8.0.0" }, "keywords": [], - "author": "", - "license": "ISC", + "author": "sendaifun", + "license": "Apache-2.0", "dependencies": { "@bonfida/spl-name-service": "^3.0.7", "@coral-xyz/anchor": "0.29", @@ -32,6 +35,7 @@ "@metaplex-foundation/umi": "^0.9.2", "@metaplex-foundation/umi-bundle-defaults": "^0.9.2", "@metaplex-foundation/umi-web3js-adapters": "^0.9.2", + "@onsol/tldparser": "^0.6.7", "@orca-so/common-sdk": "0.6.4", "@orca-so/whirlpools-sdk": "^0.13.12", "@pythnetwork/price-service-client": "^1.9.0", @@ -40,6 +44,7 @@ "@solana/web3.js": "^1.95.4", "bn.js": "^5.2.1", "bs58": "^6.0.0", + "chai": "^5.1.2", "decimal.js": "^10.4.3", "dotenv": "^16.4.5", "form-data": "^4.0.1", @@ -49,8 +54,15 @@ }, "devDependencies": { "@types/bn.js": "^5.1.5", + "@types/chai": "^5.0.1", "@types/node": "^22.9.0", "ts-node": "^10.9.2", - "typescript": "^5.7.2" + "typescript": "^5.7.2", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "@typescript-eslint/eslint-plugin": "^7.0.0", + "@typescript-eslint/parser": "^7.0.0", + "prettier": "^3.2.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 289b940..ddfc583 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,6 +50,9 @@ importers: '@metaplex-foundation/umi-web3js-adapters': specifier: ^0.9.2 version: 0.9.2(@metaplex-foundation/umi@0.9.2)(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@onsol/tldparser': + specifier: ^0.6.7 + version: 0.6.7(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bn.js@5.2.1)(borsh@2.0.0)(buffer@6.0.3)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@orca-so/common-sdk': specifier: 0.6.4 version: 0.6.4(@solana/spl-token@0.4.9(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2)(utf-8-validate@5.0.10))(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(decimal.js@10.4.3) @@ -74,6 +77,9 @@ importers: bs58: specifier: ^6.0.0 version: 6.0.0 + chai: + specifier: ^5.1.2 + version: 5.1.2 decimal.js: specifier: ^10.4.3 version: 10.4.3 @@ -96,9 +102,30 @@ importers: '@types/bn.js': specifier: ^5.1.5 version: 5.1.6 + '@types/chai': + specifier: ^5.0.1 + version: 5.0.1 '@types/node': specifier: ^22.9.0 version: 22.10.2 + '@typescript-eslint/eslint-plugin': + specifier: ^7.0.0 + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': + specifier: ^7.0.0 + version: 7.18.0(eslint@8.57.1)(typescript@5.7.2) + eslint: + specifier: ^8.56.0 + version: 8.57.1 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.1) + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.2) + prettier: + specifier: ^3.2.5 + version: 3.4.2 ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@22.10.2)(typescript@5.7.2) @@ -139,6 +166,46 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@ethersproject/bytes@5.7.0': + resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + + '@ethersproject/logger@5.7.0': + resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + + '@ethersproject/sha2@5.7.0': + resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} + + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} @@ -194,6 +261,12 @@ packages: '@lightprotocol/stateless.js@0.17.1': resolution: {integrity: sha512-EjId1n33A6dBwpce33Wsa/fs/CDKtMtRrkxbApH0alXrnEXmbW6QhIViXOrKYXjZ4uJQM1xsBtsKe0vqJ4nbtQ==} + '@metaplex-foundation/beet-solana@0.4.1': + resolution: {integrity: sha512-/6o32FNUtwK8tjhotrvU/vorP7umBuRFvBZrC6XCk51aKidBHe5LPVPA5AjGPbV3oftMfRuXPNd9yAGeEqeCDQ==} + + '@metaplex-foundation/beet@0.7.2': + resolution: {integrity: sha512-K+g3WhyFxKPc0xIvcIjNyV1eaTVJTiuaHZpig7Xx0MuYRMoJLLvhLTnUXhFdR5Tu2l2QSyKwfyXDgZlzhULqFg==} + '@metaplex-foundation/mpl-core@1.1.1': resolution: {integrity: sha512-h1kLw+cGaV8SiykoHDb1/G01+VYqtJXAt0uGuO5+2Towsdtc6ET4M62iqUnh4EacTVMIW1yYHsKsG/LYWBCKaA==} peerDependencies: @@ -306,6 +379,27 @@ packages: resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} engines: {node: ^14.21.3 || >=16} + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@onsol/tldparser@0.6.7': + resolution: {integrity: sha512-QwkRDLyC514pxeplCCXZ2kTiRcJSeUrpp+9o2XqLbePy/qzZGGG8I0UbXUKuWVD/bUL1zAm21+D+Eu30OKwcQg==} + engines: {node: '>=14'} + peerDependencies: + '@solana/web3.js': ^1.95.3 + bn.js: ^5.2.1 + borsh: ^0.7.0 + buffer: 6.0.1 + '@orca-so/common-sdk@0.6.4': resolution: {integrity: sha512-iOiC6exTA9t2CEOaUPoWlNP3soN/1yZFjoz1mSf7NvOqo/PJZeIdWpB7BRXwU0mGGatjxU4SFgMGQ8NrSx+ONw==} peerDependencies: @@ -322,6 +416,10 @@ packages: '@solana/web3.js': ^1.90.0 decimal.js: ^10.4.3 + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@pythnetwork/price-service-client@1.9.0': resolution: {integrity: sha512-SLm3IFcfmy9iMqHeT4Ih6qMNZhJEefY14T9yTlpsH2D/FE5+BaGGnfcexUifVlfH6M7mwRC4hEFdNvZ6ebZjJg==} deprecated: This package is deprecated and is no longer maintained. Please use @pythnetwork/hermes-client instead. @@ -526,9 +624,15 @@ packages: '@types/bn.js@5.1.6': resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + '@types/chai@5.0.1': + resolution: {integrity: sha512-5T8ajsg3M/FOncpLYW7sdOcD6yf4+722sze/tc4KQV0P8Z2rAr3SAuHCIkYmYpt8VbcQlnz8SxlOlPQYefe4cA==} + '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} @@ -568,6 +672,64 @@ packages: '@types/ws@8.5.13': resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} + '@typescript-eslint/eslint-plugin@7.18.0': + resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@7.18.0': + resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@7.18.0': + resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/type-utils@7.18.0': + resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@7.18.0': + resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/typescript-estree@7.18.0': + resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@7.18.0': + resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + + '@typescript-eslint/visitor-keys@7.18.0': + resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} + engines: {node: ^18.18.0 || >=20.0.0} + '@ungap/structured-clone@1.2.1': resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==} @@ -579,6 +741,11 @@ packages: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-walk@8.3.4: resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} @@ -592,19 +759,48 @@ packages: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + ansi-styles@5.2.0: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} + ansicolors@0.3.2: + resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==} + arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + assert@2.1.0: + resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + axios-retry@3.9.1: resolution: {integrity: sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w==} @@ -651,9 +847,16 @@ packages: borsh@2.0.0: resolution: {integrity: sha512-kc9+BgR3zz9+cjbwM8ODoUB4fs3X3I5A/HtX7LZKxCLaMrEeDFoBpnhZY//DTS1VZBSs6S5v46RZRbZjRFspEg==} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + bs58@4.0.1: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} @@ -674,6 +877,22 @@ packages: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} + call-bind-apply-helpers@1.0.1: + resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} + engines: {node: '>= 0.4'} + + call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + + call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} @@ -681,6 +900,14 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} + engines: {node: '>=12'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + chalk@5.4.0: resolution: {integrity: sha512-ZkD35Mx92acjB2yNJgziGqT9oKHEOxjTBTDRpOsRWtdecL/0jM3z5kM/CTzHWvHIen1GvkM85p6TuFfDGfc8/Q==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} @@ -691,6 +918,17 @@ packages: character-entities-legacy@3.0.0: resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -709,12 +947,19 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + crypto-hash@1.3.0: resolution: {integrity: sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==} engines: {node: '>=8'} @@ -722,6 +967,15 @@ packages: dayjs@1.11.13: resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} @@ -732,6 +986,21 @@ packages: decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + delay@5.0.0: resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} engines: {node: '>=10'} @@ -751,6 +1020,14 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} @@ -758,6 +1035,10 @@ packages: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + emoji-regex-xs@1.0.0: resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} @@ -765,12 +1046,82 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} es6-promisify@5.0.0: resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-plugin-prettier@5.2.1: + resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '*' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -785,15 +1136,53 @@ packages: resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} engines: {node: '> 0.1.90'} + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-stable-stringify@1.0.0: resolution: {integrity: sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==} fastestsmallesttextencoderdecoder@1.0.22: resolution: {integrity: sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==} + fastq@1.18.0: + resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + follow-redirects@1.15.9: resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} engines: {node: '>=4.0'} @@ -803,6 +1192,9 @@ packages: debug: optional: true + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + form-data-encoder@1.7.2: resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} @@ -814,15 +1206,74 @@ packages: resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} engines: {node: '>= 12.20'} + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-intrinsic@1.2.6: + resolution: {integrity: sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==} + engines: {node: '>= 0.4'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphemesplit@2.4.4: resolution: {integrity: sha512-lKrpp1mk1NH26USxC/Asw4OHbhSQf5XfrWZ+CDv/dFVvd1j17kFgMotdJvOesmHkbFX9P9sBfpH8VogxOWLg8w==} groq-sdk@0.5.0: resolution: {integrity: sha512-RVmhW7qZ+XZoy5fIuSdx/LGQJONpL8MHgZEW7dFwTdgkzStub2XQx6OKv28CHogijdwH41J+Npj/z2jBPu3vmw==} + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + hast-util-to-html@9.0.4: resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==} @@ -838,14 +1289,72 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + 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. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + ipaddr.js@2.2.0: resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==} engines: {node: '>= 10'} + is-arguments@1.2.0: + resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==} + engines: {node: '>= 0.4'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-nan@1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + engines: {node: '>= 0.4'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + is-retry-allowed@2.2.0: resolution: {integrity: sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==} engines: {node: '>=10'} + is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} + engines: {node: '>= 0.4'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isomorphic-ws@4.0.1: resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} peerDependencies: @@ -866,6 +1375,15 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} @@ -885,6 +1403,9 @@ packages: resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} engines: {node: '>=0.10.0'} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + langchain@0.3.7: resolution: {integrity: sha512-6/Gkk9Zez3HkbsETFxZVo1iKLmaK3OzkDseC5MYFKVmYFDXFAOyJR3srJ9P61xF8heVdsPixqYIsejBn7/9dXg==} engines: {node: '>=18'} @@ -939,12 +1460,26 @@ packages: openai: optional: true + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} + lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} @@ -958,12 +1493,20 @@ packages: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + mdast-util-to-hast@13.2.0: resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==} mdurl@2.0.0: resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + micromark-util-character@2.1.1: resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} @@ -979,6 +1522,10 @@ packages: micromark-util-types@2.0.1: resolution: {integrity: sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -987,6 +1534,12 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -1001,6 +1554,9 @@ packages: resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} hasBin: true + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} @@ -1021,6 +1577,21 @@ packages: resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true + object-is@1.1.6: + resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} + engines: {node: '>= 0.4'} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.7: + resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} + engines: {node: '>= 0.4'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + oniguruma-to-es@0.8.0: resolution: {integrity: sha512-rY+/a6b+uCgoYIL9itjY0x99UUDHXmGaw7Jjk5ZvM/3cxDJifyxFr/Zm4tTmF6Tre18gAakJo7AzhKUeMNLgHA==} @@ -1036,10 +1607,22 @@ packages: openapi-types@12.1.3: resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-queue@6.6.2: resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==} engines: {node: '>=8'} @@ -1058,6 +1641,51 @@ packages: pako@2.1.0: resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} + engines: {node: '>=14'} + hasBin: true + property-information@6.5.0: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} @@ -1072,6 +1700,9 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} @@ -1084,13 +1715,29 @@ packages: regex@5.0.2: resolution: {integrity: sha512-/pczGbKIQgfTMRV0XjABvc5RzLqQmwqxLHdQao2RTXPk+pmTXB2P0IaUHYdYyk412YLwUIkaeMd5T+RzVgTqnQ==} + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + retry@0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + rpc-websockets@9.0.4: resolution: {integrity: sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==} + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -1099,9 +1746,25 @@ packages: engines: {node: '>=10'} hasBin: true + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + shiki@1.24.3: resolution: {integrity: sha512-eMeX/ehE2IDKVs71kB4zVcDHjutNcOtm+yIRuR4sA6ThBbdFI0DffGJiyoKCodj0xRGxIoWC3pk/Anmm5mzHmA==} + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} @@ -1111,10 +1774,18 @@ packages: stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + superstruct@0.15.5: resolution: {integrity: sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==} @@ -1122,9 +1793,20 @@ packages: 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'} + + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + engines: {node: ^14.18.0 || >=16.0.0} + text-encoding-utf-8@1.0.2: resolution: {integrity: sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==} + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -1134,6 +1816,10 @@ packages: tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + toformat@2.0.0: resolution: {integrity: sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ==} @@ -1146,6 +1832,12 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + ts-api-utils@1.4.3: + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + ts-log@2.2.7: resolution: {integrity: sha512-320x5Ggei84AxzlXp91QkIGSw5wgaLT6GeAH0KsqDmRZdVWW2OiSeVvElVoatk3f7nicwXlElXsoFkARiGE2yg==} @@ -1173,6 +1865,14 @@ packages: tweetnacl@1.0.3: resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + typedoc@0.26.11: resolution: {integrity: sha512-sFEgRRtrcDl2FxVP58Ze++ZK2UQAEvtvvH8rRlig1Ja3o7dDaMHmaBfvJmdGnNEFaLTpQsN8dpvZaTqJSu/Ugw==} engines: {node: '>= 18'} @@ -1216,10 +1916,16 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + utf-8-validate@5.0.10: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + uuid@10.0.0: resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} hasBin: true @@ -1255,6 +1961,22 @@ packages: whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which-typed-array@1.1.18: + resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==} + engines: {node: '>= 0.4'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@7.5.10: resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} engines: {node: '>=8.3.0'} @@ -1288,6 +2010,10 @@ packages: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + zod-to-json-schema@3.24.1: resolution: {integrity: sha512-3h08nf3Vw3Wl3PK+q3ow/lIil81IT2Oa7YpQyUUDsEWbXveMesdfK1xBd2RhCkynwZndAxixji/7SYJJowr62w==} peerDependencies: @@ -1364,6 +2090,53 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.4.0 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@ethersproject/bytes@5.7.0': + dependencies: + '@ethersproject/logger': 5.7.0 + + '@ethersproject/logger@5.7.0': {} + + '@ethersproject/sha2@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + hash.js: 1.1.7 + + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.4.0 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/sourcemap-codec@1.5.0': {} @@ -1463,6 +2236,27 @@ snapshots: - encoding - utf-8-validate + '@metaplex-foundation/beet-solana@0.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@metaplex-foundation/beet': 0.7.2 + '@solana/web3.js': 1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + bs58: 5.0.0 + debug: 4.4.0 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + + '@metaplex-foundation/beet@0.7.2': + dependencies: + ansicolors: 0.3.2 + assert: 2.1.0 + bn.js: 5.2.1 + debug: 4.4.0 + transitivePeerDependencies: + - supports-color + '@metaplex-foundation/mpl-core@1.1.1(@metaplex-foundation/umi@0.9.2)(@noble/hashes@1.6.1)': dependencies: '@metaplex-foundation/umi': 0.9.2 @@ -1583,6 +2377,32 @@ snapshots: '@noble/hashes@1.6.1': {} + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.18.0 + + '@onsol/tldparser@0.6.7(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bn.js@5.2.1)(borsh@2.0.0)(buffer@6.0.3)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/sha2': 5.7.0 + '@metaplex-foundation/beet-solana': 0.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + bn.js: 5.2.1 + borsh: 2.0.0 + buffer: 6.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + '@orca-so/common-sdk@0.6.4(@solana/spl-token@0.4.9(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2)(utf-8-validate@5.0.10))(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(decimal.js@10.4.3)': dependencies: '@solana/spl-token': 0.4.9(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.2)(utf-8-validate@5.0.10) @@ -1599,6 +2419,8 @@ snapshots: decimal.js: 10.4.3 tiny-invariant: 1.3.3 + '@pkgr/core@0.1.1': {} + '@pythnetwork/price-service-client@1.9.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@pythnetwork/price-service-sdk': 1.8.0 @@ -1983,10 +2805,16 @@ snapshots: dependencies: '@types/node': 22.10.2 + '@types/chai@5.0.1': + dependencies: + '@types/deep-eql': 4.0.2 + '@types/connect@3.4.38': dependencies: '@types/node': 22.10.2 + '@types/deep-eql@4.0.2': {} + '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.3 @@ -2028,6 +2856,87 @@ snapshots: dependencies: '@types/node': 22.10.2 + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 7.18.0 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2)': + dependencies: + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.4.0 + eslint: 8.57.1 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.7.2)': + dependencies: + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) + debug: 4.4.0 + eslint: 8.57.1 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@7.18.0': {} + + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.4.0 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.7.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) + eslint: 8.57.1 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/visitor-keys@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.1': {} JSONStream@1.3.5: @@ -2039,6 +2948,10 @@ snapshots: dependencies: event-target-shim: 5.0.1 + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + acorn-walk@8.3.4: dependencies: acorn: 8.14.0 @@ -2049,14 +2962,45 @@ snapshots: dependencies: humanize-ms: 1.2.1 + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + ansi-styles@5.2.0: {} + ansicolors@0.3.2: {} + arg@4.1.3: {} argparse@2.0.1: {} + array-union@2.1.0: {} + + assert@2.1.0: + dependencies: + call-bind: 1.0.8 + is-nan: 1.3.2 + object-is: 1.1.6 + object.assign: 4.1.7 + util: 0.12.5 + + assertion-error@2.0.1: {} + asynckit@0.4.0: {} + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + axios-retry@3.9.1: dependencies: '@babel/runtime': 7.26.0 @@ -2106,10 +3050,19 @@ snapshots: borsh@2.0.0: {} + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + bs58@4.0.1: dependencies: base-x: 3.0.10 @@ -2134,16 +3087,56 @@ snapshots: node-gyp-build: 4.8.4 optional: true + call-bind-apply-helpers@1.0.1: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bind@1.0.8: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + get-intrinsic: 1.2.6 + set-function-length: 1.2.2 + + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.1 + get-intrinsic: 1.2.6 + + callsites@3.1.0: {} + camelcase@6.3.0: {} ccount@2.0.1: {} + chai@5.1.2: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.2 + pathval: 2.0.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + chalk@5.4.0: {} character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} + check-error@2.1.1: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 @@ -2156,6 +3149,8 @@ snapshots: commander@2.20.3: {} + concat-map@0.0.1: {} + create-require@1.1.1: {} cross-fetch@3.1.8: @@ -2164,16 +3159,42 @@ snapshots: transitivePeerDependencies: - encoding + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + crypto-hash@1.3.0: {} dayjs@1.11.13: {} + debug@4.4.0: + dependencies: + ms: 2.1.3 + decamelize@1.2.0: {} decimal.js-light@2.5.1: {} decimal.js@10.4.3: {} + deep-eql@5.0.2: {} + + deep-is@0.1.4: {} + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + delay@5.0.0: {} delayed-stream@1.0.0: {} @@ -2186,6 +3207,14 @@ snapshots: diff@4.0.2: {} + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-case@3.0.4: dependencies: no-case: 3.0.4 @@ -2193,16 +3222,113 @@ snapshots: dotenv@16.4.7: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + emoji-regex-xs@1.0.0: {} entities@4.5.0: {} + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.0.0: + dependencies: + es-errors: 1.3.0 + es6-promise@4.2.8: {} es6-promisify@5.0.0: dependencies: es6-promise: 4.2.8 + escape-string-regexp@4.0.0: {} + + eslint-config-prettier@9.1.0(eslint@8.57.1): + dependencies: + eslint: 8.57.1 + + eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.2): + dependencies: + eslint: 8.57.1 + prettier: 3.4.2 + prettier-linter-helpers: 1.0.0 + synckit: 0.9.2 + optionalDependencies: + eslint-config-prettier: 9.1.0(eslint@8.57.1) + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.1 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.0 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + espree@9.6.1: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 3.4.3 + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + esutils@2.0.3: {} + event-target-shim@5.0.1: {} eventemitter3@4.0.7: {} @@ -2211,14 +3337,59 @@ snapshots: eyes@0.1.8: {} + fast-deep-equal@3.1.3: {} + + fast-diff@1.3.0: {} + + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + fast-stable-stringify@1.0.0: {} fastestsmallesttextencoderdecoder@1.0.22: {} + fastq@1.18.0: + dependencies: + reusify: 1.0.4 + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + 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-cache@3.2.0: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + rimraf: 3.0.2 + + flatted@3.3.2: {} + follow-redirects@1.15.9: {} + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + form-data-encoder@1.7.2: {} form-data@4.0.1: @@ -2232,9 +3403,60 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 4.0.0-beta.3 + fs.realpath@1.0.0: {} + + function-bind@1.1.2: {} + + get-intrinsic@1.2.6: + dependencies: + call-bind-apply-helpers: 1.0.1 + dunder-proto: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + function-bind: 1.1.2 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@7.2.3: + 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 + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + gopd@1.2.0: {} + graceful-fs@4.2.11: optional: true + graphemer@1.4.0: {} + graphemesplit@2.4.4: dependencies: js-base64: 3.7.7 @@ -2253,6 +3475,27 @@ snapshots: transitivePeerDependencies: - encoding + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.1 + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hash.js@1.1.7: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + hast-util-to-html@9.0.4: dependencies: '@types/hast': 3.0.4 @@ -2279,10 +3522,58 @@ snapshots: ieee754@1.2.1: {} + ignore@5.3.2: {} + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + ipaddr.js@2.2.0: {} + is-arguments@1.2.0: + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + + is-callable@1.2.7: {} + + is-extglob@2.1.1: {} + + is-generator-function@1.0.10: + dependencies: + has-tostringtag: 1.0.2 + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-nan@1.3.2: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + + is-number@7.0.0: {} + + is-path-inside@3.0.3: {} + is-retry-allowed@2.2.0: {} + is-typed-array@1.1.15: + dependencies: + which-typed-array: 1.1.18 + + 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) @@ -2319,6 +3610,12 @@ snapshots: dependencies: argparse: 2.0.1 + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + json-stringify-safe@5.0.1: {} json5@2.2.3: {} @@ -2333,6 +3630,10 @@ snapshots: jsonpointer@5.0.1: {} + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + langchain@0.3.7(@langchain/core@0.3.26(openai@4.77.0(zod@3.24.1)))(@langchain/groq@0.1.2(@langchain/core@0.3.26(openai@4.77.0(zod@3.24.1))))(axios@1.7.9)(openai@4.77.0(zod@3.24.1)): dependencies: '@langchain/core': 0.3.26(openai@4.77.0(zod@3.24.1)) @@ -2366,12 +3667,25 @@ snapshots: optionalDependencies: openai: 4.77.0(zod@3.24.1) + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + linkify-it@5.0.0: dependencies: uc.micro: 2.1.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + lodash@4.17.21: {} + loupe@3.1.2: {} + lower-case@2.0.2: dependencies: tslib: 2.8.1 @@ -2389,6 +3703,8 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 + math-intrinsics@1.1.0: {} + mdast-util-to-hast@13.2.0: dependencies: '@types/hast': 3.0.4 @@ -2403,6 +3719,8 @@ snapshots: mdurl@2.0.0: {} + merge2@1.4.1: {} + micromark-util-character@2.1.1: dependencies: micromark-util-symbol: 2.0.1 @@ -2420,12 +3738,23 @@ snapshots: micromark-util-types@2.0.1: {} + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + mime-db@1.52.0: {} mime-types@2.1.35: dependencies: mime-db: 1.52.0 + minimalistic-assert@1.0.1: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -2436,6 +3765,8 @@ snapshots: mustache@4.2.0: {} + natural-compare@1.4.0: {} + no-case@3.0.4: dependencies: lower-case: 2.0.2 @@ -2450,6 +3781,26 @@ snapshots: node-gyp-build@4.8.4: optional: true + object-is@1.1.6: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + + object-keys@1.1.1: {} + + object.assign@4.1.7: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + has-symbols: 1.1.0 + object-keys: 1.1.1 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + oniguruma-to-es@0.8.0: dependencies: emoji-regex-xs: 1.0.0 @@ -2472,8 +3823,25 @@ snapshots: openapi-types@12.1.3: {} + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + p-finally@1.0.0: {} + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-queue@6.6.2: dependencies: eventemitter3: 4.0.7 @@ -2492,6 +3860,32 @@ snapshots: pako@2.1.0: {} + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-type@4.0.0: {} + + pathval@2.0.0: {} + + picomatch@2.3.1: {} + + possible-typed-array-names@1.0.0: {} + + prelude-ls@1.2.1: {} + + prettier-linter-helpers@1.0.0: + dependencies: + fast-diff: 1.3.0 + + prettier@3.4.2: {} + property-information@6.5.0: {} proxy-from-env@1.1.0: {} @@ -2500,6 +3894,8 @@ snapshots: punycode@2.3.1: {} + queue-microtask@1.2.3: {} + regenerator-runtime@0.14.1: {} regex-recursion@5.0.0: @@ -2512,8 +3908,16 @@ snapshots: dependencies: regex-utilities: 2.3.0 + resolve-from@4.0.0: {} + retry@0.13.1: {} + reusify@1.0.4: {} + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + rpc-websockets@9.0.4: dependencies: '@swc/helpers': 0.5.15 @@ -2527,10 +3931,29 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 5.0.10 + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + safe-buffer@5.2.1: {} semver@7.6.3: {} + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.6 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + shiki@1.24.3: dependencies: '@shikijs/core': 1.24.3 @@ -2540,6 +3963,8 @@ snapshots: '@shikijs/vscode-textmate': 9.3.1 '@types/hast': 3.0.4 + slash@3.0.0: {} + snake-case@3.0.4: dependencies: dot-case: 3.0.4 @@ -2552,20 +3977,41 @@ snapshots: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + strip-bom@3.0.0: {} + strip-json-comments@3.1.1: {} + superstruct@0.15.5: {} superstruct@2.0.2: {} + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + synckit@0.9.2: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.8.1 + text-encoding-utf-8@1.0.2: {} + text-table@0.2.0: {} + through@2.3.8: {} tiny-inflate@1.0.3: {} tiny-invariant@1.3.3: {} + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + toformat@2.0.0: {} toml@3.0.0: {} @@ -2574,6 +4020,10 @@ snapshots: trim-lines@3.0.1: {} + ts-api-utils@1.4.3(typescript@5.7.2): + dependencies: + typescript: 5.7.2 + ts-log@2.2.7: {} ts-node@10.9.2(@types/node@22.10.2)(typescript@5.7.2): @@ -2604,6 +4054,12 @@ snapshots: tweetnacl@1.0.3: {} + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-fest@0.20.2: {} + typedoc@0.26.11(typescript@5.7.2): dependencies: lunr: 2.3.9 @@ -2651,11 +4107,23 @@ snapshots: universalify@2.0.1: {} + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + utf-8-validate@5.0.10: dependencies: node-gyp-build: 4.8.4 optional: true + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.2.0 + is-generator-function: 1.0.10 + is-typed-array: 1.1.15 + which-typed-array: 1.1.18 + uuid@10.0.0: {} uuid@8.3.2: {} @@ -2685,6 +4153,23 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 + which-typed-array@1.1.18: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 + for-each: 0.3.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + word-wrap@1.2.5: {} + + wrappy@1.0.2: {} + ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 @@ -2699,6 +4184,8 @@ snapshots: yn@3.1.1: {} + yocto-queue@0.1.0: {} + zod-to-json-schema@3.24.1(zod@3.24.1): dependencies: zod: 3.24.1 diff --git a/src/agent/index.ts b/src/agent/index.ts index 56cfe74..56f66f4 100644 --- a/src/agent/index.ts +++ b/src/agent/index.ts @@ -25,12 +25,21 @@ import { stakeWithJup, sendCompressedAirdrop, createOrcaSingleSidedWhirlpool, - FEE_TIERS, + fetchPrice, pythFetchPrice, + FEE_TIERS, + getAllDomainsTLDs, + getAllRegisteredAllDomains, + getOwnedDomainsForTLD, + getMainAllDomainsDomain, + getOwnedAllDomains, + resolveAllDomains, + create_gibwork_task, } from "../tools"; import { CollectionDeployment, CollectionOptions, + GibworkCreateTaskReponse, JupiterTokenData, MintCollectionNFTResponse, PumpfunLaunchResponse, @@ -40,7 +49,7 @@ import { BN } from "@coral-xyz/anchor"; /** * Main class for interacting with Solana blockchain - * Provides a unified interface for token operations, NFT management, and trading + * Provides a unified interface for token operations, NFT management, trading and more * * @class SolanaAgentKit * @property {Connection} connection - Solana RPC connection @@ -146,6 +155,10 @@ export class SolanaAgentKit { return getTokenDataByTicker(ticker); } + async fetchTokenPrice(mint: string) { + return fetchPrice(new PublicKey(mint)); + } + async launchPumpFunToken( tokenName: string, tokenTicker: string, @@ -193,7 +206,7 @@ export class SolanaAgentKit { initialPrice: Decimal, maxPrice: Decimal, feeTier: keyof typeof FEE_TIERS, - ): Promise { + ) { return createOrcaSingleSidedWhirlpool( this, depositTokenAmount, @@ -205,6 +218,31 @@ export class SolanaAgentKit { ); } + async resolveAllDomains(domain: string): Promise { + return resolveAllDomains(this, domain); + } + + async getOwnedAllDomains(owner: PublicKey): Promise { + return getOwnedAllDomains(this, owner); + } + + async getOwnedDomainsForTLD(tld: string): Promise { + return getOwnedDomainsForTLD(this, tld); + } + + // eslint-disable-next-line @typescript-eslint/ban-types + async getAllDomainsTLDs(): Promise { + return getAllDomainsTLDs(this); + } + + async getAllRegisteredAllDomains(): Promise { + return getAllRegisteredAllDomains(this); + } + + async getMainAllDomainsDomain(owner: PublicKey): Promise { + return getMainAllDomainsDomain(this, owner); + } + async raydiumCreateAmmV4( marketId: PublicKey, baseAmount: BN, @@ -254,6 +292,7 @@ export class SolanaAgentKit { configId, mintAAmount, mintBAmount, + startTime, ); } @@ -271,10 +310,31 @@ export class SolanaAgentKit { lotSize, tickSize, - ) + ); } - async pythFetchPrice(priceFeedID: string) { - return pythFetchPrice(this, priceFeedID); + async pythFetchPrice(priceFeedID: string): Promise { + return pythFetchPrice(priceFeedID); + } + + async createGibworkTask( + title: string, + content: string, + requirements: string, + tags: string[], + tokenMintAddress: string, + tokenAmount: number, + payer?: string, + ): Promise { + return create_gibwork_task( + this, + title, + content, + requirements, + tags, + new PublicKey(tokenMintAddress), + tokenAmount, + payer ? new PublicKey(payer) : undefined, + ); } } diff --git a/src/index.ts b/src/index.ts index a1fd258..1b4116f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ -import { SolanaAgentKit } from './agent'; // Move the SolanaAgentKit class to src/agent.ts -import { createSolanaTools } from './langchain'; +import { SolanaAgentKit } from "./agent"; +import { createSolanaTools } from "./langchain"; export { SolanaAgentKit, createSolanaTools }; // Optional: Export types that users might need -export * from './types'; \ No newline at end of file +export * from "./types"; diff --git a/src/langchain/index.ts b/src/langchain/index.ts index ec1189e..2ec7389 100644 --- a/src/langchain/index.ts +++ b/src/langchain/index.ts @@ -1,9 +1,12 @@ import { PublicKey } from "@solana/web3.js"; import Decimal from "decimal.js"; import { Tool } from "langchain/tools"; -import { PythFetchPriceResponse, SolanaAgentKit } from "../index"; +import { + GibworkCreateTaskReponse, + PythFetchPriceResponse, + SolanaAgentKit, +} from "../index"; import { create_image } from "../tools/create_image"; -import { fetchPrice } from "../tools/fetch_price"; import { BN } from "@coral-xyz/anchor"; import { FEE_TIERS } from "../tools"; import { toJSON } from "../utils/toJSON"; @@ -67,7 +70,7 @@ export class SolanaTransferTool extends Tool { const tx = await this.solanaKit.transfer( recipient, parsedInput.amount, - mintAddress + mintAddress, ); return JSON.stringify({ @@ -94,7 +97,7 @@ export class SolanaDeployTokenTool extends Tool { Inputs (input is a JSON string): name: string, eg "My Token" (required) - uri: string, eg "https://example.com/token.json" (required) + uri: string, eg "https://example.com/token.json" (required) symbol: string, eg "MTK" (required) decimals?: number, eg 9 (optional, defaults to 9) initialSupply?: number, eg 1000000 (optional)`; @@ -112,7 +115,7 @@ export class SolanaDeployTokenTool extends Tool { parsedInput.uri, parsedInput.symbol, parsedInput.decimals, - parsedInput.initialSupply + parsedInput.initialSupply, ); return JSON.stringify({ @@ -192,7 +195,7 @@ export class SolanaMintNFTTool extends Tool { }, parsedInput.recipient ? new PublicKey(parsedInput.recipient) - : this.solanaKit.wallet_address + : this.solanaKit.wallet_address, ); return JSON.stringify({ @@ -240,7 +243,7 @@ export class SolanaTradeTool extends Tool { parsedInput.inputMint ? new PublicKey(parsedInput.inputMint) : new PublicKey("So11111111111111111111111111111111111111112"), - parsedInput.slippageBps + parsedInput.slippageBps, ); return JSON.stringify({ @@ -320,7 +323,7 @@ export class SolanaRegisterDomainTool extends Tool { const tx = await this.solanaKit.registerDomain( parsedInput.name, - parsedInput.spaceKB || 1 + parsedInput.spaceKB || 1, ); return JSON.stringify({ @@ -342,10 +345,12 @@ export class SolanaRegisterDomainTool extends Tool { export class SolanaResolveDomainTool extends Tool { name = "solana_resolve_domain"; - description = `Resolve a .sol domain to a Solana PublicKey. + description = `Resolve ONLY .sol domain names to a Solana PublicKey. + This tool is exclusively for .sol domains. + DO NOT use this for other domain types like .blink, .bonk, etc. Inputs: - domain: string, eg "pumpfun.sol" or "pumpfun"(required) + domain: string, eg "pumpfun.sol" (required) `; constructor(private solanaKit: SolanaAgentKit) { @@ -460,7 +465,7 @@ export class SolanaPumpfunTokenLaunchTool extends Tool { try { // Parse and normalize input input = input.trim(); - let parsedInput = JSON.parse(input); + const parsedInput = JSON.parse(input); this.validateInput(parsedInput); @@ -475,7 +480,7 @@ export class SolanaPumpfunTokenLaunchTool extends Tool { telegram: parsedInput.telegram, website: parsedInput.website, initialLiquiditySOL: parsedInput.initialLiquiditySOL, - } + }, ); return JSON.stringify({ @@ -542,7 +547,7 @@ export class SolanaLendAssetTool extends Tool { async _call(input: string): Promise { try { - let amount = JSON.parse(input).amount || input; + const amount = JSON.parse(input).amount || input; const tx = await this.solanaKit.lendAssets(amount); @@ -619,7 +624,7 @@ export class SolanaStakeTool extends Tool { export class SolanaFetchPriceTool extends Tool { name = "solana_fetch_price"; description = `Fetch the price of a given token in USDC. - + Inputs: - tokenId: string, the mint address of the token, e.g., "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"`; @@ -629,7 +634,7 @@ export class SolanaFetchPriceTool extends Tool { async _call(input: string): Promise { try { - const price = await fetchPrice(this.solanaKit, input.trim()); + const price = await this.solanaKit.fetchTokenPrice(input.trim()); return JSON.stringify({ status: "success", tokenId: input.trim(), @@ -708,7 +713,7 @@ export class SolanaTokenDataByTickerTool extends Tool { export class SolanaCompressedAirdropTool extends Tool { name = "solana_compressed_airdrop"; description = `Airdrop SPL tokens with ZK Compression (also called as airdropping tokens) - + Inputs (input is a JSON string): mintAddress: string, the mint address of the token, e.g., "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN" (required) amount: number, the amount of tokens to airdrop per recipient, e.g., 42 (required) @@ -731,7 +736,7 @@ export class SolanaCompressedAirdropTool extends Tool { parsedInput.decimals, parsedInput.recipients, parsedInput.priorityFeeInLamports || 30_000, - parsedInput.shouldLog || false + parsedInput.shouldLog || false, ); return JSON.stringify({ @@ -776,7 +781,11 @@ export class SolanaCreateSingleSidedWhirlpoolTool extends Tool { const feeTier = inputFormat.feeTier; if (!feeTier || !(feeTier in FEE_TIERS)) { - throw new Error(`Invalid feeTier. Available options: ${Object.keys(FEE_TIERS).join(", ")}`); + throw new Error( + `Invalid feeTier. Available options: ${Object.keys(FEE_TIERS).join( + ", ", + )}`, + ); } const txId = await this.solanaKit.createOrcaSingleSidedWhirlpool( @@ -820,7 +829,7 @@ export class SolanaRaydiumCreateAmmV4 extends Tool { async _call(input: string): Promise { try { - let inputFormat = JSON.parse(input) + const inputFormat = JSON.parse(input); const tx = await this.solanaKit.raydiumCreateAmmV4( new PublicKey(inputFormat.marketId), @@ -862,7 +871,7 @@ export class SolanaRaydiumCreateClmm extends Tool { async _call(input: string): Promise { try { - let inputFormat = JSON.parse(input) + const inputFormat = JSON.parse(input); const tx = await this.solanaKit.raydiumCreateClmm( new PublicKey(inputFormat.mint1), @@ -891,7 +900,7 @@ export class SolanaRaydiumCreateClmm extends Tool { export class SolanaRaydiumCreateCpmm extends Tool { name = "raydium_create_cpmm"; - description = `Raydium's newest CPMM, does not require marketID, supports Token 2022 standard + description = `Raydium's newest CPMM, does not require marketID, supports Token 2022 standard Inputs (input is a json string): mint1: string (required) @@ -908,7 +917,7 @@ export class SolanaRaydiumCreateCpmm extends Tool { async _call(input: string): Promise { try { - let inputFormat = JSON.parse(input) + const inputFormat = JSON.parse(input); const tx = await this.solanaKit.raydiumCreateCpmm( new PublicKey(inputFormat.mint1), @@ -939,7 +948,7 @@ export class SolanaRaydiumCreateCpmm extends Tool { export class SolanaOpenbookCreateMarket extends Tool { name = "solana_openbook_create_market"; - description = `Openbook marketId, required for ammv4 + description = `Openbook marketId, required for ammv4 Inputs (input is a json string): baseMint: string (required) @@ -954,7 +963,7 @@ export class SolanaOpenbookCreateMarket extends Tool { async _call(input: string): Promise { try { - let inputFormat = JSON.parse(input) + const inputFormat = JSON.parse(input); const tx = await this.solanaKit.openbookCreateMarket( new PublicKey(inputFormat.baseMint), @@ -993,14 +1002,14 @@ export class SolanaPythFetchPrice extends Tool { async _call(input: string): Promise { try { const price = await this.solanaKit.pythFetchPrice(input); - let response: PythFetchPriceResponse = { + const response: PythFetchPriceResponse = { status: "success", priceFeedID: input, price: price, }; return JSON.stringify(response); } catch (error: any) { - let response: PythFetchPriceResponse = { + const response: PythFetchPriceResponse = { status: "error", priceFeedID: input, message: error.message, @@ -1011,6 +1020,215 @@ export class SolanaPythFetchPrice extends Tool { } } +export class SolanaResolveAllDomainsTool extends Tool { + name = "solana_resolve_all_domains"; + description = `Resolve domain names to a public key for ALL domain types EXCEPT .sol domains. + Use this for domains like .blink, .bonk, etc. + DO NOT use this for .sol domains (use solana_resolve_domain instead). + + Input: + domain: string, eg "mydomain.blink" or "mydomain.bonk" (required)`; + + constructor(private solanaKit: SolanaAgentKit) { + super(); + } + + async _call(input: string): Promise { + try { + const owner = await this.solanaKit.resolveAllDomains(input); + + if (!owner) { + return JSON.stringify({ + status: "error", + message: "Domain not found", + code: "DOMAIN_NOT_FOUND", + }); + } + + return JSON.stringify({ + status: "success", + message: "Domain resolved successfully", + owner: owner?.toString(), + }); + } catch (error: any) { + return JSON.stringify({ + status: "error", + message: error.message, + code: error.code || "DOMAIN_RESOLUTION_ERROR", + }); + } + } +} + +export class SolanaGetOwnedDomains extends Tool { + name = "solana_get_owned_domains"; + description = `Get all domains owned by a specific wallet address. + + Inputs: + owner: string, eg "4Be9CvxqHW6BYiRAxW9Q3xu1ycTMWaL5z8NX4HR3ha7t" (required)`; + + constructor(private solanaKit: SolanaAgentKit) { + super(); + } + + async _call(input: string): Promise { + try { + const ownerPubkey = new PublicKey(input.trim()); + const domains = await this.solanaKit.getOwnedAllDomains(ownerPubkey); + + return JSON.stringify({ + status: "success", + message: "Owned domains fetched successfully", + domains: domains, + }); + } catch (error: any) { + return JSON.stringify({ + status: "error", + message: error.message, + code: error.code || "FETCH_OWNED_DOMAINS_ERROR", + }); + } + } +} + +export class SolanaGetOwnedTldDomains extends Tool { + name = "solana_get_owned_tld_domains"; + description = `Get all domains owned by the agent's wallet for a specific TLD. + + Inputs: + tld: string, eg "bonk" (required)`; + + constructor(private solanaKit: SolanaAgentKit) { + super(); + } + + async _call(input: string): Promise { + try { + const domains = await this.solanaKit.getOwnedDomainsForTLD(input); + + return JSON.stringify({ + status: "success", + message: "TLD domains fetched successfully", + domains: domains, + }); + } catch (error: any) { + return JSON.stringify({ + status: "error", + message: error.message, + code: error.code || "FETCH_TLD_DOMAINS_ERROR", + }); + } + } +} + +export class SolanaGetAllTlds extends Tool { + name = "solana_get_all_tlds"; + description = `Get all active top-level domains (TLDs) in the AllDomains Name Service`; + + constructor(private solanaKit: SolanaAgentKit) { + super(); + } + + async _call(): Promise { + try { + const tlds = await this.solanaKit.getAllDomainsTLDs(); + + return JSON.stringify({ + status: "success", + message: "TLDs fetched successfully", + tlds: tlds, + }); + } catch (error: any) { + return JSON.stringify({ + status: "error", + message: error.message, + code: error.code || "FETCH_TLDS_ERROR", + }); + } + } +} + +export class SolanaGetMainDomain extends Tool { + name = "solana_get_main_domain"; + description = `Get the main/favorite domain for a given wallet address. + + Inputs: + owner: string, eg "4Be9CvxqHW6BYiRAxW9Q3xu1ycTMWaL5z8NX4HR3ha7t" (required)`; + + constructor(private solanaKit: SolanaAgentKit) { + super(); + } + + async _call(input: string): Promise { + try { + const ownerPubkey = new PublicKey(input.trim()); + const mainDomain = + await this.solanaKit.getMainAllDomainsDomain(ownerPubkey); + + return JSON.stringify({ + status: "success", + message: "Main domain fetched successfully", + domain: mainDomain, + }); + } catch (error: any) { + return JSON.stringify({ + status: "error", + message: error.message, + code: error.code || "FETCH_MAIN_DOMAIN_ERROR", + }); + } + } +} + +export class SolanaCreateGibworkTask extends Tool { + name = "create_gibwork_task"; + description = `Create a task on Gibwork. + + Inputs (input is a JSON string): + title: string, title of the task (required) + content: string, description of the task (required) + requirements: string, requirements to complete the task (required) + tags: string[], list of tags associated with the task (required) + payer: string, payer address (optional, defaults to agent wallet) + tokenMintAddress: string, the mint address of the token, e.g., "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN" (required) + amount: number, payment amount (required) + `; + + constructor(private solanaSdk: SolanaAgentKit) { + super(); + } + + protected async _call(input: string): Promise { + try { + const parsedInput = JSON.parse(input); + + const taskData = await this.solanaSdk.createGibworkTask( + parsedInput.title, + parsedInput.content, + parsedInput.requirements, + parsedInput.tags, + parsedInput.tokenMintAddress, + parsedInput.amount, + parsedInput.payer, + ); + + const response: GibworkCreateTaskReponse = { + status: "success", + taskId: taskData.taskId, + signature: taskData.signature, + }; + + return JSON.stringify(response); + } catch (err: any) { + return JSON.stringify({ + status: "error", + message: err.message, + code: err.code || "CREATE_TASK_ERROR", + }); + } + } +} + export function createSolanaTools(solanaKit: SolanaAgentKit) { return [ new SolanaBalanceTool(solanaKit), @@ -1028,7 +1246,6 @@ export function createSolanaTools(solanaKit: SolanaAgentKit) { new SolanaTPSCalculatorTool(solanaKit), new SolanaStakeTool(solanaKit), new SolanaFetchPriceTool(solanaKit), - new SolanaResolveDomainTool(solanaKit), new SolanaGetDomainTool(solanaKit), new SolanaTokenDataTool(solanaKit), new SolanaTokenDataByTickerTool(solanaKit), @@ -1039,6 +1256,12 @@ export function createSolanaTools(solanaKit: SolanaAgentKit) { new SolanaOpenbookCreateMarket(solanaKit), new SolanaCreateSingleSidedWhirlpoolTool(solanaKit), new SolanaPythFetchPrice(solanaKit), + new SolanaResolveDomainTool(solanaKit), + new SolanaGetOwnedDomains(solanaKit), + new SolanaGetOwnedTldDomains(solanaKit), + new SolanaGetAllTlds(solanaKit), + new SolanaGetMainDomain(solanaKit), + new SolanaResolveAllDomainsTool(solanaKit), + new SolanaCreateGibworkTask(solanaKit), ]; } - diff --git a/src/tools/create_gibwork_task.ts b/src/tools/create_gibwork_task.ts new file mode 100644 index 0000000..40ff3c3 --- /dev/null +++ b/src/tools/create_gibwork_task.ts @@ -0,0 +1,81 @@ +import { VersionedTransaction } from "@solana/web3.js"; +import { PublicKey } from "@solana/web3.js"; +import { GibworkCreateTaskReponse, SolanaAgentKit } from "../index"; + +/** + * Create an new task on Gibwork + * @param agent SolanaAgentKit instance + * @param title Title of the task + * @param content Description of the task + * @param requirements Requirements to complete the task + * @param tags List of tags associated with the task + * @param payer Payer address for the task (default: agent wallet address) + * @param tokenMintAddress Token mint address for payment + * @param tokenAmount Payment amount for the task + * @returns Object containing task creation transaction and generated taskId + */ +export async function create_gibwork_task( + agent: SolanaAgentKit, + title: string, + content: string, + requirements: string, + tags: string[], + tokenMintAddress: PublicKey, + tokenAmount: number, + payer?: PublicKey, +): Promise { + try { + const apiResponse = await fetch( + "https://api2.gib.work/tasks/public/transaction", + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + title: title, + content: content, + requirements: requirements, + tags: tags, + payer: payer?.toBase58() || agent.wallet.publicKey.toBase58(), + token: { + mintAddress: tokenMintAddress.toBase58(), + amount: tokenAmount, + }, + }), + }, + ); + + const responseData = await apiResponse.json(); + if (!responseData.taskId && !responseData.serializedTransaction) { + throw new Error(`${responseData.message}`); + } + + const serializedTransaction = Buffer.from( + responseData.serializedTransaction, + "base64", + ); + const tx = VersionedTransaction.deserialize(serializedTransaction); + + tx.sign([agent.wallet]); + const signature = await agent.connection.sendTransaction(tx, { + preflightCommitment: "confirmed", + maxRetries: 3, + }); + + const latestBlockhash = await agent.connection.getLatestBlockhash(); + await agent.connection.confirmTransaction({ + signature, + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + }); + + return { + status: "success", + taskId: responseData.taskId, + signature: signature, + }; + } catch (err: any) { + throw new Error(`${err.message}`); + } +} diff --git a/src/tools/create_orca_single_sided_whirlpool.ts b/src/tools/create_orca_single_sided_whirlpool.ts index e0375f9..b861c94 100644 --- a/src/tools/create_orca_single_sided_whirlpool.ts +++ b/src/tools/create_orca_single_sided_whirlpool.ts @@ -39,7 +39,7 @@ import { sendTx } from "../utils/send_tx"; * @remarks * Fee tiers determine the percentage of fees collected on swaps, while tick spacing affects * the granularity of price ranges for liquidity positions. - * + * * For more details, refer to: * - [Whirlpool Fees](https://orca-so.github.io/whirlpools/Architecture%20Overview/Whirlpool%20Fees) * - [Whirlpool Parameters](https://orca-so.github.io/whirlpools/Architecture%20Overview/Whirlpool%20Parameters) @@ -53,17 +53,17 @@ export const FEE_TIERS = { 0.04: 4, 0.05: 8, 0.16: 16, - 0.30: 64, + 0.3: 64, 0.65: 96, - 1.00: 128, - 2.00: 256, + 1.0: 128, + 2.0: 256, } as const; /** * # Creates a single-sided Whirlpool. * * This function initializes a new Whirlpool (liquidity pool) on Orca and seeds it with liquidity from a single token. - * + * * ## Example Usage: * You created a new token called SHARK, and you want to set the initial price to 0.001 USDC. * You set `depositTokenMint` to SHARK's mint address and `otherTokenMint` to USDC's mint address. @@ -71,7 +71,7 @@ export const FEE_TIERS = { * 1. Increase the amount of tokens you deposit * 2. Set the initial price very low * 3. Set the maximum price closer to the initial price - * + * * ### Note for experts: * The Wrhirlpool program initializes the Whirlpool with the in a specific order. This might not be * the order you expect, so the function checks the order and adjusts the inverts the prices. This means that @@ -85,13 +85,13 @@ export const FEE_TIERS = { * @param initialPrice - The initial price of the deposit token in terms of the other token. * @param maxPrice - The maximum price at which liquidity is added. * @param feeTier - The fee tier percentage for the pool, determining tick spacing and fee collection rates. - * + * * @returns A promise that resolves to a transaction ID (`string`) of the transaction creating the pool. - * + * * @throws Will throw an error if: * - Mint accounts for the tokens cannot be fetched. * - Prices are out of bounds. - * + * * @remarks * This function is designed for single-sided deposits where users only contribute one type of token, * and the function manages mint order and necessary calculations. @@ -102,7 +102,7 @@ export const FEE_TIERS = { * import { PublicKey } from "@solana/web3.js"; * import { BN } from "@coral-xyz/anchor"; * import Decimal from "decimal.js"; - * + * * const agent = new SolanaAgentKit(wallet, connection); * const depositAmount = new BN(1_000_000_000_000); // 1 million SHARK if SHARK has 6 decimals * const depositTokenMint = new PublicKey("DEPOSTI_TOKEN_ADDRESS"); @@ -141,13 +141,19 @@ export async function createOrcaSingleSidedWhirlpool( throw new Error('Unsupported network'); } const wallet = new Wallet(agent.wallet); - const ctx = WhirlpoolContext.from(agent.connection, wallet, ORCA_WHIRLPOOL_PROGRAM_ID); + const ctx = WhirlpoolContext.from( + agent.connection, + wallet, + ORCA_WHIRLPOOL_PROGRAM_ID, + ); const fetcher = ctx.fetcher; - const correctTokenOrder = PoolUtil.orderMints(otherTokenMint, depositTokenMint).map( - (addr) => addr.toString(), - ); - const isCorrectMintOrder = correctTokenOrder[0] === depositTokenMint.toString(); + const correctTokenOrder = PoolUtil.orderMints( + otherTokenMint, + depositTokenMint, + ).map((addr) => addr.toString()); + const isCorrectMintOrder = + correctTokenOrder[0] === depositTokenMint.toString(); let mintA, mintB; if (isCorrectMintOrder) { [mintA, mintB] = [depositTokenMint, otherTokenMint]; @@ -158,10 +164,19 @@ export async function createOrcaSingleSidedWhirlpool( } const mintAAccount = await fetcher.getMintInfo(mintA); const mintBAccount = await fetcher.getMintInfo(mintB); - if (mintAAccount === null || mintBAccount === null) throw Error('Mint account not found'); + if (mintAAccount === null || mintBAccount === null) { + throw Error("Mint account not found"); + } const tickSpacing = FEE_TIERS[feeTier]; - const tickIndex = PriceMath.priceToTickIndex(initialPrice, mintAAccount.decimals, mintBAccount.decimals); - const initialTick = TickUtil.getInitializableTickIndex(tickIndex, tickSpacing); + const tickIndex = PriceMath.priceToTickIndex( + initialPrice, + mintAAccount.decimals, + mintBAccount.decimals, + ); + const initialTick = TickUtil.getInitializableTickIndex( + tickIndex, + tickSpacing, + ); const tokenExtensionCtx: TokenExtensionContextForPool = { ...NO_TOKEN_EXTENSION_CONTEXT, @@ -203,17 +218,17 @@ export async function createOrcaSingleSidedWhirlpool( tokenVaultBKeypair, feeTierKey, tickSpacing: tickSpacing, - funder: wallet.publicKey + funder: wallet.publicKey, }; const initPoolIx = !TokenExtensionUtil.isV2IxRequiredPool(tokenExtensionCtx) ? WhirlpoolIx.initializePoolIx(ctx.program, baseParamsPool) : WhirlpoolIx.initializePoolV2Ix(ctx.program, { - ...baseParamsPool, - tokenProgramA: tokenExtensionCtx.tokenMintWithProgramA.tokenProgram, - tokenProgramB: tokenExtensionCtx.tokenMintWithProgramB.tokenProgram, - tokenBadgeA, - tokenBadgeB, - }); + ...baseParamsPool, + tokenProgramA: tokenExtensionCtx.tokenMintWithProgramA.tokenProgram, + tokenProgramB: tokenExtensionCtx.tokenMintWithProgramB.tokenProgram, + tokenBadgeA, + tokenBadgeB, + }); const initialTickArrayStartTick = TickUtil.getStartTickIndex( initialTick, tickSpacing, @@ -242,14 +257,33 @@ export async function createOrcaSingleSidedWhirlpool( let tickLowerIndex, tickUpperIndex; if (isCorrectMintOrder) { tickLowerIndex = initialTick; - tickUpperIndex = PriceMath.priceToTickIndex(maxPrice, mintAAccount.decimals, mintBAccount.decimals); + tickUpperIndex = PriceMath.priceToTickIndex( + maxPrice, + mintAAccount.decimals, + mintBAccount.decimals, + ); } else { - tickLowerIndex = PriceMath.priceToTickIndex(maxPrice, mintAAccount.decimals, mintBAccount.decimals); + tickLowerIndex = PriceMath.priceToTickIndex( + maxPrice, + mintAAccount.decimals, + mintBAccount.decimals, + ); tickUpperIndex = initialTick; } - const tickLowerInitializableIndex = TickUtil.getInitializableTickIndex(tickLowerIndex, tickSpacing); - const tickUpperInitializableIndex = TickUtil.getInitializableTickIndex(tickUpperIndex, tickSpacing); - if (!TickUtil.checkTickInBounds(tickLowerInitializableIndex) || !TickUtil.checkTickInBounds(tickUpperInitializableIndex)) throw Error('Prices out of bounds'); + const tickLowerInitializableIndex = TickUtil.getInitializableTickIndex( + tickLowerIndex, + tickSpacing, + ); + const tickUpperInitializableIndex = TickUtil.getInitializableTickIndex( + tickUpperIndex, + tickSpacing, + ); + if ( + !TickUtil.checkTickInBounds(tickLowerInitializableIndex) || + !TickUtil.checkTickInBounds(tickUpperInitializableIndex) + ) { + throw Error("Prices out of bounds"); + } const increasLiquidityQuoteParam: IncreaseLiquidityQuoteParam = { inputTokenAmount: new BN(depositTokenAmount), inputTokenMint: depositTokenMint, @@ -260,11 +294,11 @@ export async function createOrcaSingleSidedWhirlpool( tickLowerIndex: tickLowerInitializableIndex, tickUpperIndex: tickUpperInitializableIndex, tokenExtensionCtx: tokenExtensionCtx, - slippageTolerance: Percentage.fromFraction(0, 100) - } + slippageTolerance: Percentage.fromFraction(0, 100), + }; const liquidityInput = increaseLiquidityQuoteByInputTokenWithParams( - increasLiquidityQuoteParam - ) + increasLiquidityQuoteParam, + ); const { liquidityAmount: liquidity, tokenMaxA, tokenMaxB } = liquidityInput; const positionMintKeypair = Keypair.generate(); @@ -292,7 +326,7 @@ export async function createOrcaSingleSidedWhirlpool( ...params, positionMint: positionMintPubkey, withTokenMetadataExtension: true, - }) + }); txBuilder.addInstruction(positionIx); txBuilder.addSigner(positionMintKeypair); @@ -372,17 +406,15 @@ export async function createOrcaSingleSidedWhirlpool( tickArrayUpper: tickArrayUpperPda.publicKey, }; - const liquidityIx = !TokenExtensionUtil.isV2IxRequiredPool( - tokenExtensionCtx, - ) + const liquidityIx = !TokenExtensionUtil.isV2IxRequiredPool(tokenExtensionCtx) ? increaseLiquidityIx(ctx.program, baseParamsLiquidity) : increaseLiquidityV2Ix(ctx.program, { - ...baseParamsLiquidity, - tokenMintA: mintA, - tokenMintB: mintB, - tokenProgramA: tokenExtensionCtx.tokenMintWithProgramA.tokenProgram, - tokenProgramB: tokenExtensionCtx.tokenMintWithProgramB.tokenProgram, - }); + ...baseParamsLiquidity, + tokenMintA: mintA, + tokenMintB: mintB, + tokenProgramA: tokenExtensionCtx.tokenMintWithProgramA.tokenProgram, + tokenProgramB: tokenExtensionCtx.tokenMintWithProgramB.tokenProgram, + }); txBuilder.addInstruction(liquidityIx); const txPayload = await txBuilder.build(); diff --git a/src/tools/deploy_collection.ts b/src/tools/deploy_collection.ts index 4528b92..10fef9d 100644 --- a/src/tools/deploy_collection.ts +++ b/src/tools/deploy_collection.ts @@ -1,8 +1,19 @@ import { SolanaAgentKit } from "../index"; -import { generateSigner, keypairIdentity, publicKey } from "@metaplex-foundation/umi"; -import { createCollection, mplCore, ruleSet } from "@metaplex-foundation/mpl-core"; +import { + generateSigner, + keypairIdentity, + publicKey, +} from "@metaplex-foundation/umi"; +import { + createCollection, + mplCore, + ruleSet, +} from "@metaplex-foundation/mpl-core"; import { CollectionOptions, CollectionDeployment } from "../types"; -import { fromWeb3JsKeypair, toWeb3JsPublicKey } from "@metaplex-foundation/umi-web3js-adapters"; +import { + fromWeb3JsKeypair, + toWeb3JsPublicKey, +} from "@metaplex-foundation/umi-web3js-adapters"; import { createUmi } from "@metaplex-foundation/umi-bundle-defaults"; /** @@ -28,11 +39,11 @@ export async function deploy_collection( address: publicKey(creator.address), percentage: creator.percentage, })) || [ - { - address: publicKey(agent.wallet_address.toString()), - percentage: 100, - }, - ]; + { + address: publicKey(agent.wallet_address.toString()), + percentage: 100, + }, + ]; // Create collection const tx = await createCollection(umi, { diff --git a/src/tools/deploy_token.ts b/src/tools/deploy_token.ts index 93502ec..7532eef 100644 --- a/src/tools/deploy_token.ts +++ b/src/tools/deploy_token.ts @@ -2,9 +2,17 @@ import { SolanaAgentKit } from "../index"; import { PublicKey } from "@solana/web3.js"; import { createUmi } from "@metaplex-foundation/umi-bundle-defaults"; import { generateSigner, keypairIdentity } from "@metaplex-foundation/umi"; -import { createFungible, mintV1, TokenStandard } from "@metaplex-foundation/mpl-token-metadata"; -import { fromWeb3JsKeypair, fromWeb3JsPublicKey, toWeb3JsPublicKey } from "@metaplex-foundation/umi-web3js-adapters"; -import {mplToolbox} from "@metaplex-foundation/mpl-toolbox" +import { + createFungible, + mintV1, + TokenStandard, +} from "@metaplex-foundation/mpl-token-metadata"; +import { + fromWeb3JsKeypair, + fromWeb3JsPublicKey, + toWeb3JsPublicKey, +} from "@metaplex-foundation/umi-web3js-adapters"; +import { mplToolbox } from "@metaplex-foundation/mpl-toolbox"; /** * Deploy a new SPL token @@ -22,11 +30,11 @@ export async function deploy_token( uri: string, symbol: string, decimals: number = 9, - initialSupply?: number + initialSupply?: number, ): Promise<{ mint: PublicKey }> { try { // Create UMI instance from agent - const umi = createUmi(agent.connection.rpcEndpoint).use(mplToolbox()) + const umi = createUmi(agent.connection.rpcEndpoint).use(mplToolbox()); umi.use(keypairIdentity(fromWeb3JsKeypair(agent.wallet))); // Create new token mint @@ -52,11 +60,11 @@ export async function deploy_token( tokenStandard: TokenStandard.Fungible, tokenOwner: fromWeb3JsPublicKey(agent.wallet_address), amount: initialSupply, - }) + }), ); } - builder.sendAndConfirm(umi, { confirm: { commitment: 'finalized' } }); + builder.sendAndConfirm(umi, { confirm: { commitment: "finalized" } }); return { mint: toWeb3JsPublicKey(mint.publicKey), diff --git a/src/tools/fetch_price.ts b/src/tools/fetch_price.ts index 764e8e6..cca1925 100644 --- a/src/tools/fetch_price.ts +++ b/src/tools/fetch_price.ts @@ -1,20 +1,13 @@ -import { SolanaAgentKit } from "../index"; -import { Tool } from "langchain/tools"; +import { PublicKey } from "@solana/web3.js"; /** - * Fetch the price of a given token in USDC using Jupiter API - * @param agent SolanaAgentKit instance + * Fetch the price of a given token quoted in USDC using Jupiter API * @param tokenId The token mint address - * @returns The price of the token in USDC + * @returns The price of the token quoted in USDC */ -export async function fetchPrice( - agent: SolanaAgentKit, - tokenId: string -): Promise { +export async function fetchPrice(tokenId: PublicKey): Promise { try { - const response = await fetch( - `https://api.jup.ag/price/v2?ids=${tokenId}` - ); + const response = await fetch(`https://api.jup.ag/price/v2?ids=${tokenId}`); if (!response.ok) { throw new Error(`Failed to fetch price: ${response.statusText}`); @@ -22,7 +15,7 @@ export async function fetchPrice( const data = await response.json(); - const price = data.data[tokenId]?.price; + const price = data.data[tokenId.toBase58()]?.price; if (!price) { throw new Error("Price data not available for the given token."); @@ -32,4 +25,4 @@ export async function fetchPrice( } catch (error: any) { throw new Error(`Price fetch failed: ${error.message}`); } -} \ No newline at end of file +} diff --git a/src/tools/get_all_domains_tlds.ts b/src/tools/get_all_domains_tlds.ts new file mode 100644 index 0000000..12bd9f0 --- /dev/null +++ b/src/tools/get_all_domains_tlds.ts @@ -0,0 +1,19 @@ +import { SolanaAgentKit } from "../index"; +import { getAllTld } from "@onsol/tldparser"; + +/** + * Get all active top-level domains (TLDs) in the AllDomains Name Service + * @param agent SolanaAgentKit instance + * @returns Array of active TLD strings + */ +export async function getAllDomainsTLDs( + agent: SolanaAgentKit, + // eslint-disable-next-line @typescript-eslint/ban-types +): Promise { + try { + const tlds = await getAllTld(agent.connection); + return tlds.map((tld) => tld.tld); + } catch (error: any) { + throw new Error(`Failed to fetch TLDs: ${error.message}`); + } +} diff --git a/src/tools/get_all_registered_all_domains.ts b/src/tools/get_all_registered_all_domains.ts new file mode 100644 index 0000000..019a5ea --- /dev/null +++ b/src/tools/get_all_registered_all_domains.ts @@ -0,0 +1,36 @@ +import { getAllDomains } from "@bonfida/spl-name-service"; +import { SolanaAgentKit } from "../agent"; +import { PublicKey } from "@solana/web3.js"; +import { getAllDomainsTLDs } from "./get_all_domains_tlds"; + +/** + * Get all registered domains across all TLDs + * @param agent SolanaAgentKit instance + * @returns Array of all registered domain names with their TLDs + */ +export async function getAllRegisteredAllDomains( + agent: SolanaAgentKit, +): Promise { + try { + // First get all TLDs + const tlds = await getAllDomainsTLDs(agent); + const allDomains: string[] = []; + + // For each TLD, fetch all registered domains + for (const tld of tlds) { + const domains = await getAllDomains( + agent.connection, + new PublicKey("namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX"), + ); + + // Add domains with TLD suffix + domains.forEach((domain) => { + allDomains.push(`${domain}.${tld}`); + }); + } + + return allDomains; + } catch (error: any) { + throw new Error(`Failed to fetch all registered domains: ${error.message}`); + } +} diff --git a/src/tools/get_balance.ts b/src/tools/get_balance.ts index 05a56a1..a1e3736 100644 --- a/src/tools/get_balance.ts +++ b/src/tools/get_balance.ts @@ -11,11 +11,12 @@ export async function get_balance( agent: SolanaAgentKit, token_address?: PublicKey, ): Promise { - if (!token_address) + if (!token_address) { return ( (await agent.connection.getBalance(agent.wallet_address)) / LAMPORTS_PER_SOL ); + } const token_account = await agent.connection.getTokenAccountBalance(token_address); diff --git a/src/tools/get_main_all_domains_domain.ts b/src/tools/get_main_all_domains_domain.ts new file mode 100644 index 0000000..d9ac724 --- /dev/null +++ b/src/tools/get_main_all_domains_domain.ts @@ -0,0 +1,21 @@ +import { getFavoriteDomain as _getFavoriteDomain } from "@bonfida/spl-name-service"; +import { PublicKey } from "@solana/web3.js"; + +/** + * Get the user's main/favorite domain for a SolanaAgentKit instance + * @param agent SolanaAgentKit instance + * @param owner Owner's public key + * @returns Promise resolving to the main domain name or null if not found + */ +export async function getMainAllDomainsDomain( + agent: any, + owner: PublicKey, +): Promise { + let mainDomain = null; + try { + mainDomain = await _getFavoriteDomain(agent.connection, owner); + return mainDomain.stale ? null : mainDomain.reverse; + } catch (error: any) { + return null; + } +} diff --git a/src/tools/get_owned_all_domains.ts b/src/tools/get_owned_all_domains.ts new file mode 100644 index 0000000..aa52e1e --- /dev/null +++ b/src/tools/get_owned_all_domains.ts @@ -0,0 +1,23 @@ +import { SolanaAgentKit } from "../agent"; +import { PublicKey } from "@solana/web3.js"; +import { TldParser } from "@onsol/tldparser"; + +/** + * Get all domains owned domains for a specific TLD for the agent's wallet + * @param agent SolanaAgentKit instance + * @param owner - PublicKey of the owner + * @returns Promise resolving to an array of owned domains or an empty array if none are found + */ +export async function getOwnedAllDomains( + agent: SolanaAgentKit, + owner: PublicKey, +): Promise { + try { + const domains = await new TldParser( + agent.connection, + ).getParsedAllUserDomains(owner); + return domains.map((domain) => domain.domain); + } catch (error: any) { + throw new Error(`Failed to fetch owned domains: ${error.message}`); + } +} diff --git a/src/tools/get_owned_domains_for_tld.ts b/src/tools/get_owned_domains_for_tld.ts new file mode 100644 index 0000000..c3fde6a --- /dev/null +++ b/src/tools/get_owned_domains_for_tld.ts @@ -0,0 +1,21 @@ +import { TldParser } from "@onsol/tldparser"; +import { SolanaAgentKit } from "../agent"; +/** + * Get all domains owned by an address for a specific TLD + * @param agent SolanaAgentKit instance + * @param tld Top-level domain (e.g., "sol") + * @returns Promise resolving to an array of owned domain names for the specified TLD or an empty array if none are found + */ +export async function getOwnedDomainsForTLD( + agent: SolanaAgentKit, + tld: string, +): Promise { + try { + const domains = await new TldParser( + agent.connection, + ).getParsedAllUserDomainsFromTld(agent.wallet_address, tld); + return domains.map((domain) => domain.domain); + } catch (error: any) { + throw new Error(`Failed to fetch domains for TLD: ${error.message}`); + } +} diff --git a/src/tools/get_primary_domain.ts b/src/tools/get_primary_domain.ts index 775af4b..1a2bd8c 100644 --- a/src/tools/get_primary_domain.ts +++ b/src/tools/get_primary_domain.ts @@ -16,22 +16,22 @@ import { SolanaAgentKit } from "../index"; */ export async function getPrimaryDomain( agent: SolanaAgentKit, - account: PublicKey + account: PublicKey, ): Promise { try { const { reverse, stale } = await _getPrimaryDomain( agent.connection, - account + account, ); if (stale) { throw new Error( - `Primary domain is stale for account: ${account.toBase58()}` + `Primary domain is stale for account: ${account.toBase58()}`, ); } return reverse; } catch (error) { throw new Error( - `Failed to get primary domain for account: ${account.toBase58()}` + `Failed to get primary domain for account: ${account.toBase58()}`, ); } } diff --git a/src/tools/get_token_data.ts b/src/tools/get_token_data.ts index 110a801..6e6bc44 100644 --- a/src/tools/get_token_data.ts +++ b/src/tools/get_token_data.ts @@ -27,11 +27,11 @@ export async function getTokenDataByAddress( } export async function getTokenAddressFromTicker( - ticker: string + ticker: string, ): Promise { try { const response = await fetch( - `https://api.dexscreener.com/latest/dex/search?q=${ticker}` + `https://api.dexscreener.com/latest/dex/search?q=${ticker}`, ); const data = await response.json(); @@ -46,7 +46,7 @@ export async function getTokenAddressFromTicker( solanaPairs = solanaPairs.filter( (pair: any) => - pair.baseToken.symbol.toLowerCase() === ticker.toLowerCase() + pair.baseToken.symbol.toLowerCase() === ticker.toLowerCase(), ); // Return the address of the highest FDV Solana pair @@ -58,11 +58,11 @@ export async function getTokenAddressFromTicker( } export async function getTokenDataByTicker( - ticker: string + ticker: string, ): Promise { const address = await getTokenAddressFromTicker(ticker); if (!address) { throw new Error(`Token address not found for ticker: ${ticker}`); } return getTokenDataByAddress(new PublicKey(address)); -} \ No newline at end of file +} diff --git a/src/tools/index.ts b/src/tools/index.ts index eee0471..9a18cf4 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -16,8 +16,24 @@ export * from "./stake_with_jup"; export * from "./fetch_price"; export * from "./send_compressed_airdrop"; export * from "./create_orca_single_sided_whirlpool"; +export * from "./get_all_domains_tlds"; +export * from "./get_all_registered_all_domains"; +export * from "./get_owned_domains_for_tld"; +export * from "./get_main_all_domains_domain"; +export * from "./get_owned_all_domains"; +export * from "./resolve_domain"; + +export * from "./get_all_domains_tlds"; +export * from "./get_all_registered_all_domains"; +export * from "./get_owned_domains_for_tld"; +export * from "./get_main_all_domains_domain"; +export * from "./get_owned_all_domains"; +export * from "./resolve_domain"; + export * from "./raydium_create_ammV4"; export * from "./raydium_create_clmm"; export * from "./raydium_create_cpmm"; export * from "./openbook_create_market"; -export * from "./pyth_fetch_price"; \ No newline at end of file +export * from "./pyth_fetch_price"; + +export * from "./create_gibwork_task"; diff --git a/src/tools/launch_pumpfun_token.ts b/src/tools/launch_pumpfun_token.ts index 0c3e6f5..08fd3bf 100644 --- a/src/tools/launch_pumpfun_token.ts +++ b/src/tools/launch_pumpfun_token.ts @@ -21,9 +21,15 @@ async function uploadMetadata( formData.append("showName", "true"); - if (options?.twitter) formData.append("twitter", options.twitter); - if (options?.telegram) formData.append("telegram", options.telegram); - if (options?.website) formData.append("website", options.website); + if (options?.twitter) { + formData.append("twitter", options.twitter); + } + if (options?.telegram) { + formData.append("telegram", options.telegram); + } + if (options?.website) { + formData.append("website", options.website); + } const imageResponse = await fetch(imageUrl); const imageBlob = await imageResponse.blob(); diff --git a/src/tools/lend.ts b/src/tools/lend.ts index 7889343..732f00c 100644 --- a/src/tools/lend.ts +++ b/src/tools/lend.ts @@ -1,6 +1,5 @@ import { VersionedTransaction } from "@solana/web3.js"; -import { LuloAccountDetailsResponse } from "../types"; -import { SolanaAgentKit } from "../agent"; +import { SolanaAgentKit } from "../index"; /** * Lend tokens for yields using Lulo @@ -10,7 +9,7 @@ import { SolanaAgentKit } from "../agent"; */ export async function lendAsset( agent: SolanaAgentKit, - amount: number + amount: number, ): Promise { try { const response = await fetch( @@ -23,14 +22,14 @@ export async function lendAsset( body: JSON.stringify({ account: agent.wallet.publicKey.toBase58(), }), - } + }, ); const data = await response.json(); // Deserialize the transaction const luloTxn = VersionedTransaction.deserialize( - Buffer.from(data.transaction, "base64") + Buffer.from(data.transaction, "base64"), ); // Get a recent blockhash and set it diff --git a/src/tools/mint_nft.ts b/src/tools/mint_nft.ts index 09bfe32..4c25b91 100644 --- a/src/tools/mint_nft.ts +++ b/src/tools/mint_nft.ts @@ -1,11 +1,15 @@ import { SolanaAgentKit } from "../index"; -import { generateSigner, keypairIdentity } from '@metaplex-foundation/umi'; -import { create, mplCore } from '@metaplex-foundation/mpl-core'; -import { fetchCollection } from '@metaplex-foundation/mpl-core'; +import { generateSigner, keypairIdentity } from "@metaplex-foundation/umi"; +import { create, mplCore } from "@metaplex-foundation/mpl-core"; +import { fetchCollection } from "@metaplex-foundation/mpl-core"; import { PublicKey } from "@solana/web3.js"; -import { fromWeb3JsKeypair, fromWeb3JsPublicKey, toWeb3JsPublicKey } from "@metaplex-foundation/umi-web3js-adapters"; -import { createUmi } from '@metaplex-foundation/umi-bundle-defaults'; -import { MintCollectionNFTResponse } from '../types'; +import { + fromWeb3JsKeypair, + fromWeb3JsPublicKey, + toWeb3JsPublicKey, +} from "@metaplex-foundation/umi-web3js-adapters"; +import { createUmi } from "@metaplex-foundation/umi-bundle-defaults"; +import { MintCollectionNFTResponse } from "../types"; /** * Mint a new NFT as part of an existing collection @@ -27,7 +31,7 @@ export async function mintCollectionNFT( share: number; }>; }, - recipient?: PublicKey + recipient?: PublicKey, ): Promise { try { // Create UMI instance from agent @@ -49,15 +53,15 @@ export async function mintCollectionNFT( collection: collection, name: metadata.name, uri: metadata.uri, - owner: fromWeb3JsPublicKey(recipient ?? agent.wallet.publicKey) + owner: fromWeb3JsPublicKey(recipient ?? agent.wallet.publicKey), }).sendAndConfirm(umi); return { mint: toWeb3JsPublicKey(assetSigner.publicKey), // Note: Token account is now handled automatically by the create instruction - metadata: toWeb3JsPublicKey(assetSigner.publicKey) + metadata: toWeb3JsPublicKey(assetSigner.publicKey), }; } catch (error: any) { throw new Error(`Collection NFT minting failed: ${error.message}`); } -} \ No newline at end of file +} diff --git a/src/tools/openbook_create_market.ts b/src/tools/openbook_create_market.ts index 4e9c592..c7c12aa 100644 --- a/src/tools/openbook_create_market.ts +++ b/src/tools/openbook_create_market.ts @@ -1,33 +1,34 @@ -import { OPEN_BOOK_PROGRAM, Raydium, TxVersion } from "@raydium-io/raydium-sdk-v2"; +import { + OPEN_BOOK_PROGRAM, + Raydium, + TxVersion, +} from "@raydium-io/raydium-sdk-v2"; import { MintLayout, TOKEN_PROGRAM_ID } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; -import { SolanaAgentKit } from "../agent"; +import { SolanaAgentKit } from "../index"; export async function openbookCreateMarket( agent: SolanaAgentKit, - baseMint: PublicKey, quoteMint: PublicKey, - lotSize: number = 1, tickSize: number = 0.01, ): Promise { - const raydium = await Raydium.load({ owner: agent.wallet, connection: agent.connection, - }) + }); - const baseMintInfo = await agent.connection.getAccountInfo(baseMint) - const quoteMintInfo = await agent.connection.getAccountInfo(quoteMint) + const baseMintInfo = await agent.connection.getAccountInfo(baseMint); + const quoteMintInfo = await agent.connection.getAccountInfo(quoteMint); if ( baseMintInfo?.owner.toString() !== TOKEN_PROGRAM_ID.toBase58() || quoteMintInfo?.owner.toString() !== TOKEN_PROGRAM_ID.toBase58() ) { throw new Error( - 'openbook market only support TOKEN_PROGRAM_ID mints, if you want to create pool with token-2022, please create raydium cpmm pool instead' - ) + "openbook market only support TOKEN_PROGRAM_ID mints, if you want to create pool with token-2022, please create raydium cpmm pool instead", + ); } const { execute } = await raydium.marketV2.create({ @@ -44,9 +45,9 @@ export async function openbookCreateMarket( dexProgramId: OPEN_BOOK_PROGRAM, txVersion: TxVersion.V0, - }) + }); - const { txIds } = await execute({ sequentially: true, }) + const { txIds } = await execute({ sequentially: true }); - return txIds + return txIds; } diff --git a/src/tools/pyth_fetch_price.ts b/src/tools/pyth_fetch_price.ts index 5ff7317..789cec8 100644 --- a/src/tools/pyth_fetch_price.ts +++ b/src/tools/pyth_fetch_price.ts @@ -1,6 +1,3 @@ -import { PublicKey } from "@solana/web3.js"; -import { SolanaAgentKit } from "../index"; -import { Tool } from "langchain/tools"; import { PriceServiceConnection } from "@pythnetwork/price-service-client"; import BN from "bn.js"; @@ -9,40 +6,35 @@ import BN from "bn.js"; * @param agent SolanaAgentKit instance * @param priceFeedID Price feed ID * @returns Latest price value from feed - * + * * You can find priceFeedIDs here: https://www.pyth.network/developers/price-feed-ids#stable */ -export async function pythFetchPrice( - agent: SolanaAgentKit, - priceFeedID: string -) { - // get Hermes service URL from https://docs.pyth.network/price-feeds/api-instances-and-providers/hermes +export async function pythFetchPrice(priceFeedID: string): Promise { + // get Hermes service URL from https://docs.pyth.network/price-feeds/api-instances-and-providers/hermes const stableHermesServiceUrl: string = "https://hermes.pyth.network"; const connection = new PriceServiceConnection(stableHermesServiceUrl); const feeds = [priceFeedID]; try { const currentPrice = await connection.getLatestPriceFeeds(feeds); - + if (currentPrice === undefined) { throw new Error("Price data not available for the given token."); } - + if (currentPrice.length === 0) { throw new Error("Price data not available for the given token."); } - + // get price and exponent from price feed - let price = new BN(currentPrice[0].getPriceUnchecked().price); - let exponent = new BN(currentPrice[0].getPriceUnchecked().expo); - + const price = new BN(currentPrice[0].getPriceUnchecked().price); + const exponent = new BN(currentPrice[0].getPriceUnchecked().expo); + // convert to scaled price - let scaledPrice = price.div(new BN(10).pow(exponent)); - + const scaledPrice = price.div(new BN(10).pow(exponent)); + return scaledPrice.toString(); } catch (error: any) { throw new Error(`Fetching price from Pyth failed: ${error.message}`); } } - - diff --git a/src/tools/raydium_create_ammV4.ts b/src/tools/raydium_create_ammV4.ts index 53d78b3..98f641e 100644 --- a/src/tools/raydium_create_ammV4.ts +++ b/src/tools/raydium_create_ammV4.ts @@ -1,42 +1,59 @@ -import { AMM_V4, FEE_DESTINATION_ID, MARKET_STATE_LAYOUT_V3, OPEN_BOOK_PROGRAM, Raydium, TxVersion } from "@raydium-io/raydium-sdk-v2"; +import { + AMM_V4, + FEE_DESTINATION_ID, + MARKET_STATE_LAYOUT_V3, + OPEN_BOOK_PROGRAM, + Raydium, + TxVersion, +} from "@raydium-io/raydium-sdk-v2"; import { MintLayout, TOKEN_PROGRAM_ID } from "@solana/spl-token"; import { PublicKey } from "@solana/web3.js"; -import BN from 'bn.js'; -import { SolanaAgentKit } from "../agent"; +import BN from "bn.js"; +import { SolanaAgentKit } from "../index"; export async function raydiumCreateAmmV4( agent: SolanaAgentKit, - marketId: PublicKey, - baseAmount: BN, quoteAmount: BN, - startTime: BN, ): Promise { - const raydium = await Raydium.load({ owner: agent.wallet, connection: agent.connection, - }) + }); - const marketBufferInfo = await agent.connection.getAccountInfo(new PublicKey(marketId)) - const { baseMint, quoteMint } = MARKET_STATE_LAYOUT_V3.decode(marketBufferInfo!.data) + const marketBufferInfo = await agent.connection.getAccountInfo( + new PublicKey(marketId), + ); + const { baseMint, quoteMint } = MARKET_STATE_LAYOUT_V3.decode( + marketBufferInfo!.data, + ); - const baseMintInfo = await agent.connection.getAccountInfo(baseMint) - const quoteMintInfo = await agent.connection.getAccountInfo(quoteMint) + const baseMintInfo = await agent.connection.getAccountInfo(baseMint); + const quoteMintInfo = await agent.connection.getAccountInfo(quoteMint); if ( baseMintInfo?.owner.toString() !== TOKEN_PROGRAM_ID.toBase58() || quoteMintInfo?.owner.toString() !== TOKEN_PROGRAM_ID.toBase58() ) { throw new Error( - 'amm pools with openbook market only support TOKEN_PROGRAM_ID mints, if you want to create pool with token-2022, please create cpmm pool instead' - ) + "amm pools with openbook market only support TOKEN_PROGRAM_ID mints, if you want to create pool with token-2022, please create cpmm pool instead", + ); } - if (baseAmount.mul(quoteAmount).lte(new BN(1).mul(new BN(10 ** MintLayout.decode(baseMintInfo.data).decimals)).pow(new BN(2)))) { - throw new Error('initial liquidity too low, try adding more baseAmount/quoteAmount') + if ( + baseAmount + .mul(quoteAmount) + .lte( + new BN(1) + .mul(new BN(10 ** MintLayout.decode(baseMintInfo.data).decimals)) + .pow(new BN(2)), + ) + ) { + throw new Error( + "initial liquidity too low, try adding more baseAmount/quoteAmount", + ); } const { execute } = await raydium.liquidity.createPoolV4({ @@ -63,9 +80,9 @@ export async function raydiumCreateAmmV4( associatedOnly: false, txVersion: TxVersion.V0, feeDestinationId: FEE_DESTINATION_ID, - }) + }); - const { txId } = await execute({ sendAndConfirm: true }) + const { txId } = await execute({ sendAndConfirm: true }); - return txId -} \ No newline at end of file + return txId; +} diff --git a/src/tools/raydium_create_clmm.ts b/src/tools/raydium_create_clmm.ts index 8dbd5e6..7d049d4 100644 --- a/src/tools/raydium_create_clmm.ts +++ b/src/tools/raydium_create_clmm.ts @@ -1,62 +1,66 @@ -import { CLMM_PROGRAM_ID, Raydium, TxVersion } from '@raydium-io/raydium-sdk-v2' -import { MintLayout } from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' -import BN from 'bn.js' -import Decimal from 'decimal.js' -import { SolanaAgentKit } from '../agent' +import { + CLMM_PROGRAM_ID, + Raydium, + TxVersion, +} from "@raydium-io/raydium-sdk-v2"; +import { MintLayout } from "@solana/spl-token"; +import { PublicKey } from "@solana/web3.js"; +import BN from "bn.js"; +import Decimal from "decimal.js"; +import { SolanaAgentKit } from "../index"; export async function raydiumCreateClmm( agent: SolanaAgentKit, - mint1: PublicKey, mint2: PublicKey, - configId: PublicKey, - initialPrice: Decimal, startTime: BN, ): Promise { - const raydium = await Raydium.load({ owner: agent.wallet, connection: agent.connection, - }) + }); - const [mintInfo1, mintInfo2] = await agent.connection.getMultipleAccountsInfo([mint1, mint2]) - if (mintInfo1 === null || mintInfo2 === null) throw Error('fetch mint info error') + const [mintInfo1, mintInfo2] = await agent.connection.getMultipleAccountsInfo( + [mint1, mint2], + ); + if (mintInfo1 === null || mintInfo2 === null) { + throw Error("fetch mint info error"); + } - const mintDecodeInfo1 = MintLayout.decode(mintInfo1.data) - const mintDecodeInfo2 = MintLayout.decode(mintInfo2.data) + const mintDecodeInfo1 = MintLayout.decode(mintInfo1.data); + const mintDecodeInfo2 = MintLayout.decode(mintInfo2.data); const mintFormatInfo1 = { chainId: 101, address: mint1.toString(), programId: mintInfo1.owner.toString(), - logoURI: '', - symbol: '', - name: '', + logoURI: "", + symbol: "", + name: "", decimals: mintDecodeInfo1.decimals, tags: [], - extensions: {} - } + extensions: {}, + }; const mintFormatInfo2 = { chainId: 101, address: mint2.toString(), programId: mintInfo2.owner.toString(), - logoURI: '', - symbol: '', - name: '', + logoURI: "", + symbol: "", + name: "", decimals: mintDecodeInfo2.decimals, tags: [], - extensions: {} - } + extensions: {}, + }; const { execute } = await raydium.clmm.createPool({ programId: CLMM_PROGRAM_ID, // programId: DEVNET_PROGRAM_ID.CLMM, mint1: mintFormatInfo1, mint2: mintFormatInfo2, - // @ts-ignore + // @ts-expect-error sdk bug ammConfig: { id: configId }, initialPrice, startTime, @@ -65,9 +69,9 @@ export async function raydiumCreateClmm( // units: 600000, // microLamports: 46591500, // }, - }) + }); - const { txId } = await execute({ sendAndConfirm: true }) + const { txId } = await execute({ sendAndConfirm: true }); - return txId + return txId; } diff --git a/src/tools/raydium_create_cpmm.ts b/src/tools/raydium_create_cpmm.ts index 4a520e2..35c702d 100644 --- a/src/tools/raydium_create_cpmm.ts +++ b/src/tools/raydium_create_cpmm.ts @@ -2,62 +2,61 @@ import { CREATE_CPMM_POOL_FEE_ACC, CREATE_CPMM_POOL_PROGRAM, Raydium, - TxVersion -} from '@raydium-io/raydium-sdk-v2' -import { MintLayout } from '@solana/spl-token' -import { PublicKey } from '@solana/web3.js' -import BN from 'bn.js' -import { SolanaAgentKit } from '../agent' + TxVersion, +} from "@raydium-io/raydium-sdk-v2"; +import { MintLayout } from "@solana/spl-token"; +import { PublicKey } from "@solana/web3.js"; +import BN from "bn.js"; +import { SolanaAgentKit } from "../index"; export async function raydiumCreateCpmm( agent: SolanaAgentKit, - mintA: PublicKey, mintB: PublicKey, - configId: PublicKey, - mintAAmount: BN, mintBAmount: BN, - startTime: BN, ): Promise { - const raydium = await Raydium.load({ owner: agent.wallet, connection: agent.connection, - }) + }); - const [mintInfoA, mintInfoB] = await agent.connection.getMultipleAccountsInfo([mintA, mintB]) - if (mintInfoA === null || mintInfoB === null) throw Error('fetch mint info error') + const [mintInfoA, mintInfoB] = await agent.connection.getMultipleAccountsInfo( + [mintA, mintB], + ); + if (mintInfoA === null || mintInfoB === null) { + throw Error("fetch mint info error"); + } - const mintDecodeInfoA = MintLayout.decode(mintInfoA.data) - const mintDecodeInfoB = MintLayout.decode(mintInfoB.data) + const mintDecodeInfoA = MintLayout.decode(mintInfoA.data); + const mintDecodeInfoB = MintLayout.decode(mintInfoB.data); const mintFormatInfoA = { chainId: 101, address: mintA.toString(), programId: mintInfoA.owner.toString(), - logoURI: '', - symbol: '', - name: '', + logoURI: "", + symbol: "", + name: "", decimals: mintDecodeInfoA.decimals, tags: [], - extensions: {} - } + extensions: {}, + }; const mintFormatInfoB = { chainId: 101, address: mintB.toString(), programId: mintInfoB.owner.toString(), - logoURI: '', - symbol: '', - name: '', + logoURI: "", + symbol: "", + name: "", decimals: mintDecodeInfoB.decimals, tags: [], - extensions: {} - } + extensions: {}, + }; - const { execute, extInfo } = await raydium.cpmm.createPool({ + const { execute } = await raydium.cpmm.createPool({ programId: CREATE_CPMM_POOL_PROGRAM, poolFeeAccount: CREATE_CPMM_POOL_FEE_ACC, mintA: mintFormatInfoA, @@ -65,7 +64,7 @@ export async function raydiumCreateCpmm( mintAAmount, mintBAmount, startTime, - //@ts-ignore + //@ts-expect-error sdk bug feeConfig: { id: configId.toString() }, associatedOnly: false, ownerInfo: { @@ -76,9 +75,9 @@ export async function raydiumCreateCpmm( // units: 600000, // microLamports: 46591500, // }, - }) + }); - const { txId } = await execute({ sendAndConfirm: true }) + const { txId } = await execute({ sendAndConfirm: true }); - return txId + return txId; } diff --git a/src/tools/resolve_domain.ts b/src/tools/resolve_domain.ts new file mode 100644 index 0000000..6de2206 --- /dev/null +++ b/src/tools/resolve_domain.ts @@ -0,0 +1,30 @@ +import { TldParser } from "@onsol/tldparser"; +import { SolanaAgentKit } from "../index"; +import { PublicKey } from "@solana/web3.js"; + +/** + * Resolve all domains for a given agent and domain + * @param agent SolanaAgentKit instance + * @param domain Domain name to resolve + * @returns Promise resolving to the domain or undefined if not found + */ +export async function resolveAllDomains( + agent: SolanaAgentKit, + domain: string, +): Promise { + try { + const tld = await new TldParser(agent.connection).getOwnerFromDomainTld( + domain, + ); + return tld; + } catch (error: any) { + if ( + error.message.includes( + "Cannot read properties of undefined (reading 'owner')", + ) + ) { + return undefined; + } + throw new Error(`Domain resolution failed: ${error.message}`); + } +} diff --git a/src/tools/resolve_sol_domain.ts b/src/tools/resolve_sol_domain.ts index d8764cc..6969a4c 100644 --- a/src/tools/resolve_sol_domain.ts +++ b/src/tools/resolve_sol_domain.ts @@ -16,7 +16,7 @@ import { SolanaAgentKit } from "../index"; */ export async function resolveSolDomain( agent: SolanaAgentKit, - domain: string + domain: string, ): Promise { if (!domain || typeof domain !== "string") { throw new Error("Invalid domain. Expected a non-empty string."); diff --git a/src/tools/send_compressed_airdrop.ts b/src/tools/send_compressed_airdrop.ts index 313bbdb..3df33ef 100644 --- a/src/tools/send_compressed_airdrop.ts +++ b/src/tools/send_compressed_airdrop.ts @@ -1,12 +1,11 @@ import { AddressLookupTableAccount, ComputeBudgetProgram, - Connection, Keypair, PublicKey, TransactionInstruction, } from "@solana/web3.js"; -import { SolanaAgentKit } from "../agent/index.js"; +import { SolanaAgentKit } from "../index"; import { buildAndSignTx, calculateComputeUnitPrice, @@ -19,7 +18,7 @@ import { CompressedTokenProgram, createTokenPool, } from "@lightprotocol/compressed-token"; -import { Account, getOrCreateAssociatedTokenAccount } from "@solana/spl-token"; +import { getOrCreateAssociatedTokenAccount } from "@solana/spl-token"; // arbitrary const MAX_AIRDROP_RECIPIENTS = 1000; @@ -33,7 +32,7 @@ const MAX_CONCURRENT_TXS = 30; */ export const getAirdropCostEstimate = ( numberOfRecipients: number, - priorityFeeInLamports: number + priorityFeeInLamports: number, ) => { const baseFee = 5000; const perRecipientCompressedStateFee = 300; @@ -63,36 +62,34 @@ export async function sendCompressedAirdrop( decimals: number, recipients: PublicKey[], priorityFeeInLamports: number, - shouldLog: boolean = false + shouldLog: boolean = false, ): Promise { if (recipients.length > MAX_AIRDROP_RECIPIENTS) { throw new Error( - `Max airdrop can be ${MAX_AIRDROP_RECIPIENTS} recipients at a time. For more scale, use open source ZK Compression airdrop tools such as https://github.com/helius-labs/airship.` + `Max airdrop can be ${MAX_AIRDROP_RECIPIENTS} recipients at a time. For more scale, use open source ZK Compression airdrop tools such as https://github.com/helius-labs/airship.`, ); } - const url = agent.connection.rpcEndpoint; if (url.includes("devnet")) { throw new Error("Devnet is not supported for airdrop. Please use mainnet."); } if (!url.includes("helius")) { console.warn( - "Warning: Must use RPC with ZK Compression support. Double check with your RPC provider if in doubt." + "Warning: Must use RPC with ZK Compression support. Double check with your RPC provider if in doubt.", ); } - let sourceTokenAccount: Account; try { - sourceTokenAccount = await getOrCreateAssociatedTokenAccount( + await getOrCreateAssociatedTokenAccount( agent.connection, agent.wallet, mintAddress, - agent.wallet.publicKey + agent.wallet.publicKey, ); } catch (error) { throw new Error( - "Source token account not found and failed to create it. Please add funds to your wallet and try again." + "Source token account not found and failed to create it. Please add funds to your wallet and try again.", ); } @@ -100,7 +97,7 @@ export async function sendCompressedAirdrop( await createTokenPool( agent.connection as unknown as Rpc, agent.wallet, - mintAddress + mintAddress, ); } catch (error: any) { if (error.message.includes("already in use")) { @@ -116,7 +113,7 @@ export async function sendCompressedAirdrop( mintAddress, recipients, priorityFeeInLamports, - shouldLog + shouldLog, ); } @@ -126,7 +123,7 @@ async function processAll( mint: PublicKey, recipients: PublicKey[], priorityFeeInLamports: number, - shouldLog: boolean + shouldLog: boolean, ): Promise { const mintAddress = mint; const payer = agent.wallet; @@ -135,13 +132,13 @@ async function processAll( agent.connection, agent.wallet, mintAddress, - agent.wallet.publicKey + agent.wallet.publicKey, ); const maxRecipientsPerInstruction = 5; const maxIxs = 3; // empirically determined (as of 12/15/2024) const lookupTableAddress = new PublicKey( - "9NYFyEqPkyXUhkerbGHXUXkvb4qpzeEdHuGpgbgpH1NJ" + "9NYFyEqPkyXUhkerbGHXUXkvb4qpzeEdHuGpgbgpH1NJ", ); const lookupTableAccount = ( @@ -164,7 +161,7 @@ async function processAll( ComputeBudgetProgram.setComputeUnitPrice({ microLamports: calculateComputeUnitPrice( priorityFeeInLamports, - 500_000 + 500_000, ), }), ]; @@ -184,13 +181,13 @@ async function processAll( toAddress: batch, amount: batch.map(() => amount), mint: mintAddress, - }) + }), ); } const compressIxs = await Promise.all(compressIxPromises); return [...instructions, ...compressIxs]; - }) + }), ); const url = agent.connection.rpcEndpoint; @@ -225,12 +222,12 @@ async function processAll( instructions, payer, lookupTableAccount, - i + idx + i + idx, ).then((signature) => { confirmedCount++; log("\r" + renderProgressBar(confirmedCount, totalBatches)); return signature; - }) + }), ); const batchResults = await Promise.allSettled(batchPromises); @@ -250,7 +247,7 @@ async function processAll( throw new Error( `Failed to process ${failures.length} batches: ${failures .map((f) => f.error) - .join(", ")}` + .join(", ")}`, ); } @@ -262,7 +259,7 @@ async function sendTransactionWithRetry( instructions: TransactionInstruction[], payer: Keypair, lookupTableAccount: AddressLookupTableAccount, - batchIndex: number + batchIndex: number, ): Promise { const MAX_RETRIES = 3; const INITIAL_BACKOFF = 500; // ms @@ -275,7 +272,7 @@ async function sendTransactionWithRetry( payer, blockhash, [], - [lookupTableAccount] + [lookupTableAccount], ); const signature = await sendAndConfirmTx(connection, tx); @@ -292,7 +289,7 @@ async function sendTransactionWithRetry( throw new Error( `Batch ${batchIndex} failed after ${attempt + 1} attempts: ${ error.message - }` + }`, ); } diff --git a/src/tools/stake_with_jup.ts b/src/tools/stake_with_jup.ts index e152532..c05915b 100644 --- a/src/tools/stake_with_jup.ts +++ b/src/tools/stake_with_jup.ts @@ -1,5 +1,5 @@ import { VersionedTransaction } from "@solana/web3.js"; -import { SolanaAgentKit } from "../agent"; +import { SolanaAgentKit } from "../index"; /** * Stake SOL with Jup validator diff --git a/src/tools/trade.ts b/src/tools/trade.ts index b17bc41..b42cc2a 100644 --- a/src/tools/trade.ts +++ b/src/tools/trade.ts @@ -1,4 +1,8 @@ -import { VersionedTransaction, PublicKey, LAMPORTS_PER_SOL } from "@solana/web3.js"; +import { + VersionedTransaction, + PublicKey, + LAMPORTS_PER_SOL, +} from "@solana/web3.js"; import { SolanaAgentKit } from "../index"; import { TOKENS, DEFAULT_OPTIONS, JUP_API } from "../constants"; diff --git a/src/tools/transfer.ts b/src/tools/transfer.ts index acfec82..9e11dd7 100644 --- a/src/tools/transfer.ts +++ b/src/tools/transfer.ts @@ -1,14 +1,10 @@ import { SolanaAgentKit } from "../index"; -import { - PublicKey, - SystemProgram, - Transaction -} from "@solana/web3.js"; +import { PublicKey, SystemProgram, Transaction } from "@solana/web3.js"; import { LAMPORTS_PER_SOL } from "@solana/web3.js"; -import { - getAssociatedTokenAddress, +import { + getAssociatedTokenAddress, createTransferInstruction, - getMint + getMint, } from "@solana/spl-token"; /** @@ -23,7 +19,7 @@ export async function transfer( agent: SolanaAgentKit, to: PublicKey, amount: number, - mint?: PublicKey + mint?: PublicKey, ): Promise { try { let tx: string; @@ -34,19 +30,19 @@ export async function transfer( SystemProgram.transfer({ fromPubkey: agent.wallet_address, toPubkey: to, - lamports: amount * LAMPORTS_PER_SOL - }) + lamports: amount * LAMPORTS_PER_SOL, + }), ); - tx = await agent.connection.sendTransaction( - transaction, - [agent.wallet] - ); + tx = await agent.connection.sendTransaction(transaction, [agent.wallet]); } else { // Transfer SPL token - const fromAta = await getAssociatedTokenAddress(mint, agent.wallet_address); + const fromAta = await getAssociatedTokenAddress( + mint, + agent.wallet_address, + ); const toAta = await getAssociatedTokenAddress(mint, to); - + // Get mint info to determine decimals const mintInfo = await getMint(agent.connection, mint); const adjustedAmount = amount * Math.pow(10, mintInfo.decimals); @@ -56,18 +52,15 @@ export async function transfer( fromAta, toAta, agent.wallet_address, - adjustedAmount - ) + adjustedAmount, + ), ); - tx = await agent.connection.sendTransaction( - transaction, - [agent.wallet] - ); + tx = await agent.connection.sendTransaction(transaction, [agent.wallet]); } return tx; } catch (error: any) { throw new Error(`Transfer failed: ${error.message}`); } -} \ No newline at end of file +} diff --git a/src/types/index.ts b/src/types/index.ts index 6c9dc16..95d1fc5 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -85,3 +85,9 @@ export interface PythFetchPriceResponse { message?: string; code?: string; } + +export interface GibworkCreateTaskReponse { + status: "success" | "error"; + taskId?: string | undefined; + signature?: string | undefined; +} diff --git a/src/utils/keypair.ts b/src/utils/keypair.ts index 4b2035c..665765b 100644 --- a/src/utils/keypair.ts +++ b/src/utils/keypair.ts @@ -4,4 +4,4 @@ import bs58 from "bs58"; export const keypair = Keypair.generate(); console.log(keypair.publicKey.toString()); -console.log(bs58.encode(keypair.secretKey)); \ No newline at end of file +console.log(bs58.encode(keypair.secretKey)); diff --git a/test/index.ts b/test/index.ts index bc16847..c6f188d 100644 --- a/test/index.ts +++ b/test/index.ts @@ -14,7 +14,7 @@ function validateEnvironment(): void { const missingVars: string[] = []; const requiredVars = ["OPENAI_API_KEY", "RPC_URL", "SOLANA_PRIVATE_KEY"]; - requiredVars.forEach(varName => { + requiredVars.forEach((varName) => { if (!process.env[varName]) { missingVars.push(varName); } @@ -22,7 +22,7 @@ function validateEnvironment(): void { if (missingVars.length > 0) { console.error("Error: Required environment variables are not set"); - missingVars.forEach(varName => { + missingVars.forEach((varName) => { console.error(`${varName}=your_${varName.toLowerCase()}_here`); }); process.exit(1); @@ -50,13 +50,13 @@ async function initializeAgent() { } } - const solanaKit = new SolanaAgentKit( + const solanaAgent = new SolanaAgentKit( process.env.SOLANA_PRIVATE_KEY!, process.env.RPC_URL, - process.env.OPENAI_API_KEY! + process.env.OPENAI_API_KEY!, ); - const tools = createSolanaTools(solanaKit); + const tools = createSolanaTools(solanaAgent); const memory = new MemorySaver(); const config = { configurable: { thread_id: "Solana Agent Kit!" } }; @@ -65,14 +65,13 @@ async function initializeAgent() { tools, checkpointSaver: memory, messageModifier: ` - You are a helpful agent that can interact onchain using the Solana Agent Kit. You are - empowered to interact onchain using your tools. If you ever need funds, you can request them from the - faucet. If not, you can provide your wallet details and request funds from the user. If there is a 5XX - (internal) HTTP error code, ask the user to try again later. If someone asks you to do something you - can't do with your currently available tools, you must say so, and encourage them to implement it - themselves using the Solana Agent Kit, recommend they go to https://www.solanaagentkit.xyz for more information. Be - concise and helpful with your responses. Refrain from restating your tools' descriptions unless it is - explicitly requested. + You are a helpful agent that can interact onchain using the Solana Agent Kit. You are + empowered to interact onchain using your tools. If you ever need funds, you can request them from the + faucet. If not, you can provide your wallet details and request funds from the user. If there is a 5XX + (internal) HTTP error code, ask the user to try again later. If someone asks you to do something you + can't do with your currently available tools, you must say so, and encourage them to implement it + themselves using the Solana Agent Kit, recommend they go to https://www.solanaagentkit.xyz for more information. Be + concise and helpful with your responses. Refrain from restating your tools' descriptions unless it is explicitly requested. `, }); @@ -96,7 +95,10 @@ async function runAutonomousMode(agent: any, config: any, interval = 10) { "Be creative and do something interesting on the blockchain. " + "Choose an action or set of actions and execute it that highlights your abilities."; - const stream = await agent.stream({ messages: [new HumanMessage(thought)] }, config); + const stream = await agent.stream( + { messages: [new HumanMessage(thought)] }, + config, + ); for await (const chunk of stream) { if ("agent" in chunk) { @@ -107,7 +109,7 @@ async function runAutonomousMode(agent: any, config: any, interval = 10) { console.log("-------------------"); } - await new Promise(resolve => setTimeout(resolve, interval * 1000)); + await new Promise((resolve) => setTimeout(resolve, interval * 1000)); } catch (error) { if (error instanceof Error) { console.error("Error:", error.message); @@ -126,7 +128,7 @@ async function runChatMode(agent: any, config: any) { }); const question = (prompt: string): Promise => - new Promise(resolve => rl.question(prompt, resolve)); + new Promise((resolve) => rl.question(prompt, resolve)); try { while (true) { @@ -136,7 +138,10 @@ async function runChatMode(agent: any, config: any) { break; } - const stream = await agent.stream({ messages: [new HumanMessage(userInput)] }, config); + const stream = await agent.stream( + { messages: [new HumanMessage(userInput)] }, + config, + ); for await (const chunk of stream) { if ("agent" in chunk) { @@ -164,7 +169,7 @@ async function chooseMode(): Promise<"chat" | "auto"> { }); const question = (prompt: string): Promise => - new Promise(resolve => rl.question(prompt, resolve)); + new Promise((resolve) => rl.question(prompt, resolve)); while (true) { console.log("\nAvailable modes:"); @@ -206,7 +211,7 @@ async function main() { } if (require.main === module) { - main().catch(error => { + main().catch((error) => { console.error("Fatal error:", error); process.exit(1); });