Skip to content

Missing sendAndConfirmTransaction in @solana/web3.js v2.0.0 Release Candidates #3608

@ahmedoubadi

Description

@ahmedoubadi

Overview

While using the latest version of @solana/web3.js (^2.0.0-rc.0 and ^2.0.0-rc.4), I was unable to find the sendAndConfirmTransaction function, which is a critical method for submitting and confirming transactions in Solana applications. Instead, I discovered alternative functions with internal naming conventions that suggest they are not intended for general use, such as:

  • sendAndConfirmTransactionFactory
  • sendAndConfirmDurableNonceTransactionFactory
  • sendAndConfirmTransactionWithBlockhashLifetime_INTERNAL_ONLY_DO_NOT_EXPORT
  • sendAndConfirmDurableNonceTransaction_INTERNAL_ONLY_DO_NOT_EXPORT

This appears to be an unintended omission or a breaking change that is not documented.

Steps to reproduce

  1. Install the latest @solana/web3.js package using npm:
    npm install @solana/web3.js@^2.0.0-rc.0
  2. Attempt to import and use the sendAndConfirmTransaction function:
    const { sendAndConfirmTransaction } = require('@solana/web3.js');
    console.log(sendAndConfirmTransaction); // Expected: function definition, Actual: undefined
  3. Search through the library exports to verify if the function exists:
    const solanaWeb3 = require('@solana/web3.js');
    console.log(Object.keys(solanaWeb3));

Description of bug

The sendAndConfirmTransaction function is absent in the latest release candidates (^2.0.0-rc.0 and ^2.0.0-rc.4). This function is essential for users of the library, and its absence is unexpected. Based on the library exports, only factory methods and internal methods appear to be available, none of which provide clear documentation or guidance for users.

This breaks existing codebases that rely on the previous stable versions of @solana/web3.js. Additionally, the lack of documentation regarding this change exacerbates the issue.

Environment Details

  • Node.js version: v20.11.1
  • npm version: 10.4.0
  • @solana/web3.js version: ^2.0.0-rc.0 and ^2.0.0-rc.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions