Umi — API References - v1.3.0
    Preparing search index...

    Class TransactionBuilder

    A builder that helps construct transactions.

    Implements

    Index

    Constructors

    Properties

    items: WrappedInstruction[] = []

    Methods

    • Parameters

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

      Returns Transaction

    • Parameters

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

      Returns Promise<Transaction>

    • Parameters

      Returns Promise<Transaction>

    • Parameters

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

      Returns boolean

    • Returns undefined | string

    • Returns number

    • Parameters

      Returns Signer

    • Parameters

      Returns Promise<SolAmount>

    • Parameters

      Returns Signer[]

    • Parameters

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

      Returns number

    • Parameters

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

      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, "transactions" | "payer">

      Returns TransactionBuilder[]