A builder that helps construct transactions.

Hierarchy

  • TransactionBuilder

Implements

Constructors

Properties

items: WrappedInstruction[] = []

Methods

  • Parameters

    • context: Pick<Context, "payer" | "transactions">

    Returns Transaction

  • Parameters

    • context: Pick<Context, "rpc" | "payer" | "transactions">

    Returns Promise<Transaction>

  • Parameters

    • context: Pick<Context, "payer" | "transactions">

    Returns boolean

  • Returns undefined | string

  • Returns number

  • Parameters

    Returns Signer

  • Parameters

    Returns Promise<SolAmount>

  • Parameters

    Returns Signer[]

  • Parameters

    • context: Pick<Context, "payer" | "transactions">

    Returns number

  • Parameters

    • context: Pick<Context, "payer" | "transactions">

    Returns number

  • Split the builder into multiple builders, such that each of them should fit in a single transaction.

    This method is unsafe for several reasons:

    • Because transactions are atomic, splitting the builder into multiple transactions may cause undesired side effects. For example, if the first transaction succeeds but the second one fails, you may end up with an inconsistent account state. This is why it is recommended to manually split your transactions such that each of them is valid on its own.
    • It can only split the instructions of the builder. Meaning that, if the builder has a single instruction that is too big to fit in a single transaction, it will not be able to split it.

    Parameters

    • context: Pick<Context, "payer" | "transactions">

    Returns TransactionBuilder[]

Generated using TypeDoc