@orca-so/tx-sender
    Preparing search index...

    Function buildAndSendTransaction

    • Builds and sends a transaction with the given instructions, signers, and commitment level.

      Parameters

      • instructions: Instruction<
            string,
            readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[],
        >[]

        Array of instructions to include in the transaction.

      • payer: KeyPairSigner | NoopSigner

        The fee payer for the transaction.

      • OptionallookupTableAddresses: (string | Address)[]

        Optional array of address lookup table addresses to use.

      • Optionalcommitment: Commitment = "confirmed"

        The commitment level for transaction confirmation.

      Returns Promise<Signature>

      A promise that resolves to the transaction signature.

      If transaction building or sending fails.

      // With KeyPairSigner (Node.js) - fully signed and sent
      const { instructions } = await swapInstructions(rpc, params, pool, 100, keypairSigner);
      const signature = await buildAndSendTransaction(instructions, keypairSigner);