Documentation
    Preparing search index...

    Transaction Builder

    Indexable

    • [key: number]: boolean
    Index

    Constructors

    Properties

    object: {
        clock(): { $kind: "Input"; Input: number; type?: "object" };
        denyList(
            options?: { mutable?: boolean },
        ): { $kind: "Input"; Input: number; type?: "object" };
        option(
            __namedParameters: {
                type: string;
                value: TransactionObjectInput | null;
            },
        ): (tx: Transaction) => TransactionResult;
        random(): { $kind: "Input"; Input: number; type?: "object" };
        system(
            options?: { mutable?: boolean },
        ): { $kind: "Input"; Input: number; type?: "object" };
        (
            value: TransactionObjectInput,
        ): { $kind: "Input"; Input: number; type?: "object" };
    } = ...

    Add a new object input to the transaction.

    Accessors

    • get gas(): { $kind: "GasCoin"; GasCoin: true }

      Returns an argument for the gas coin, to be used in a transaction.

      Returns { $kind: "GasCoin"; GasCoin: true }

    • get pure(): {
          id: (
              value: string,
          ) =>
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          address(
              value: string,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          bool(
              value: boolean,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          option<Type extends PureTypeName>(
              type: Type extends PureTypeName ? ValidPureTypeName<Type<Type>> : Type,
              value: ShapeFromPureTypeName<Type> | null | undefined,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          string(
              value: string,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u128(
              value: string | number | bigint,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u16(
              value: number,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u256(
              value: string | number | bigint,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u32(
              value: number,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u64(
              value: string | number | bigint,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u8(
              value: number,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          vector<Type extends PureTypeName>(
              type: Type extends PureTypeName ? ValidPureTypeName<Type<Type>> : Type,
              value: Iterable<ShapeFromPureTypeName<Type>, any, any> & {
                  length: number;
              },
          ): | { $kind: "GasCoin"; GasCoin: true }
          | { $kind: "Input"; Input: number; type?: "pure" }
          | { $kind: "Input"; Input: number; type?: "object" }
          | { $kind: "Result"; Result: number }
          | { $kind: "NestedResult"; NestedResult: [number, number] };
          <Type extends PureTypeName>(
              type: Type extends PureTypeName ? ValidPureTypeName<Type<Type>> : Type,
              value: ShapeFromPureTypeName<Type>,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          (
              value: Uint8Array<ArrayBufferLike> | SerializedBcs<any, any>,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
      }

      Returns {
          id: (
              value: string,
          ) =>
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          address(
              value: string,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          bool(
              value: boolean,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          option<Type extends PureTypeName>(
              type: Type extends PureTypeName ? ValidPureTypeName<Type<Type>> : Type,
              value: ShapeFromPureTypeName<Type> | null | undefined,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          string(
              value: string,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u128(
              value: string | number | bigint,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u16(
              value: number,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u256(
              value: string | number | bigint,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u32(
              value: number,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u64(
              value: string | number | bigint,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          u8(
              value: number,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          vector<Type extends PureTypeName>(
              type: Type extends PureTypeName ? ValidPureTypeName<Type<Type>> : Type,
              value: Iterable<ShapeFromPureTypeName<Type>, any, any> & {
                  length: number;
              },
          ): | { $kind: "GasCoin"; GasCoin: true }
          | { $kind: "Input"; Input: number; type?: "pure" }
          | { $kind: "Input"; Input: number; type?: "object" }
          | { $kind: "Result"; Result: number }
          | { $kind: "NestedResult"; NestedResult: [number, number] };
          <Type extends PureTypeName>(
              type: Type extends PureTypeName ? ValidPureTypeName<Type<Type>> : Type,
              value: ShapeFromPureTypeName<Type>,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
          (
              value: Uint8Array<ArrayBufferLike> | SerializedBcs<any, any>,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] };
      }

        • <Type extends PureTypeName>(
              type: Type extends PureTypeName ? ValidPureTypeName<Type<Type>> : Type,
              value: ShapeFromPureTypeName<Type>,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }
        • Type Parameters

          Parameters

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

        • (
              value: Uint8Array<ArrayBufferLike> | SerializedBcs<any, any>,
          ):
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }
        • Parameters

          • value: Uint8Array<ArrayBufferLike> | SerializedBcs<any, any>

            The pure value, serialized to BCS. If this is a Uint8Array, then the value is assumed to be raw bytes, and will be used directly.

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • id: (
            value: string,
        ) =>
            | { $kind: "GasCoin"; GasCoin: true }
            | { $kind: "Input"; Input: number; type?: "pure" }
            | { $kind: "Input"; Input: number; type?: "object" }
            | { $kind: "Result"; Result: number }
            | { $kind: "NestedResult"; NestedResult: [number, number] }
      • address: function
        • Parameters

          • value: string

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • bool: function
        • Parameters

          • value: boolean

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • option: function
        • Type Parameters

          Parameters

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • string: function
        • Parameters

          • value: string

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • u128: function
        • Parameters

          • value: string | number | bigint

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • u16: function
        • Parameters

          • value: number

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • u256: function
        • Parameters

          • value: string | number | bigint

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • u32: function
        • Parameters

          • value: number

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • u64: function
        • Parameters

          • value: string | number | bigint

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • u8: function
        • Parameters

          • value: number

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

      • vector: function
        • Type Parameters

          Parameters

          Returns
              | { $kind: "GasCoin"; GasCoin: true }
              | { $kind: "Input"; Input: number; type?: "pure" }
              | { $kind: "Input"; Input: number; type?: "object" }
              | { $kind: "Result"; Result: number }
              | { $kind: "NestedResult"; NestedResult: [number, number] }

    Methods

    • Add a transaction to the transaction

      Type Parameters

      Parameters

      • command: T

      Returns TransactionResult

    • Add a transaction to the transaction

      Type Parameters

      Parameters

      Returns T

    • Add a transaction to the transaction

      Type Parameters

      • T extends void | TransactionResultArgument

      Parameters

      • asyncTransactionThunk: AsyncTransactionThunk<T>

      Returns T

    • Parameters

      Returns void

    • Build the transaction to BCS bytes.

      Parameters

      Returns Promise<Uint8Array<ArrayBuffer>>

    • Get a snapshot of the transaction data, in JSON form:

      Returns {
          commands: EnumOutputShapeWithKeys<
              {
                  $Intent: {
                      data: { [key: string]: unknown };
                      inputs: {
                          [key: string]:
                              | { $kind: "GasCoin"; GasCoin: true }
                              | { $kind: "Input"; Input: number; type?: "pure" }
                              | { $kind: "Input"; Input: number; type?: "object" }
                              | { $kind: "Result"; Result: number }
                              | { $kind: "NestedResult"; NestedResult: [number, number] }
                              | (
                                  | { $kind: "GasCoin"; GasCoin: true }
                                  | { $kind: "Input"; Input: number; type?: (...) | (...) }
                                  | { $kind: "Input"; Input: number; type?: (...) | (...) }
                                  | { $kind: "Result"; Result: number }
                                  | { $kind: "NestedResult"; NestedResult: [(...), (...)] }
                              )[];
                      };
                      name: string;
                  };
                  MakeMoveVec: {
                      elements: (
                          | { $kind: "GasCoin"; GasCoin: true }
                          | { $kind: "Input"; Input: number; type?: "pure" }
                          | { $kind: "Input"; Input: number; type?: "object" }
                          | { $kind: "Result"; Result: number }
                          | { $kind: "NestedResult"; NestedResult: [number, number] }
                      )[];
                      type: string | null;
                  };
                  MergeCoins: {
                      destination: | { $kind: "GasCoin"; GasCoin: true }
                      | { $kind: "Input"; Input: number; type?: "pure" }
                      | { $kind: "Input"; Input: number; type?: "object" }
                      | { $kind: "Result"; Result: number }
                      | { $kind: "NestedResult"; NestedResult: [number, number] };
                      sources: (
                          | { $kind: "GasCoin"; GasCoin: true }
                          | { $kind: "Input"; Input: number; type?: "pure" }
                          | { $kind: "Input"; Input: number; type?: "object" }
                          | { $kind: "Result"; Result: number }
                          | { $kind: "NestedResult"; NestedResult: [number, number] }
                      )[];
                  };
                  MoveCall: {
                      _argumentTypes?: | {
                          body: OpenMoveTypeSignatureBody;
                          ref: "&"
                          | "&mut"
                          | null;
                      }[]
                      | null;
                      arguments: (
                          | { $kind: "GasCoin"; GasCoin: true }
                          | { $kind: "Input"; Input: number; type?: "pure" }
                          | { $kind: "Input"; Input: number; type?: "object" }
                          | { $kind: "Result"; Result: number }
                          | { $kind: "NestedResult"; NestedResult: [number, number] }
                      )[];
                      function: string;
                      module: string;
                      package: string;
                      typeArguments: string[];
                  };
                  Publish: { dependencies: string[]; modules: string[] };
                  SplitCoins: {
                      amounts: (
                          | { $kind: "GasCoin"; GasCoin: true }
                          | { $kind: "Input"; Input: number; type?: "pure" }
                          | { $kind: "Input"; Input: number; type?: "object" }
                          | { $kind: "Result"; Result: number }
                          | { $kind: "NestedResult"; NestedResult: [number, number] }
                      )[];
                      coin:
                          | { $kind: "GasCoin"; GasCoin: true }
                          | { $kind: "Input"; Input: number; type?: "pure" }
                          | { $kind: "Input"; Input: number; type?: "object" }
                          | { $kind: "Result"; Result: number }
                          | { $kind: "NestedResult"; NestedResult: [number, number] };
                  };
                  TransferObjects: {
                      address: | { $kind: "GasCoin"; GasCoin: true }
                      | { $kind: "Input"; Input: number; type?: "pure" }
                      | { $kind: "Input"; Input: number; type?: "object" }
                      | { $kind: "Result"; Result: number }
                      | { $kind: "NestedResult"; NestedResult: [number, number] };
                      objects: (
                          | { $kind: "GasCoin"; GasCoin: true }
                          | { $kind: "Input"; Input: number; type?: "pure" }
                          | { $kind: "Input"; Input: number; type?: "object" }
                          | { $kind: "Result"; Result: number }
                          | { $kind: "NestedResult"; NestedResult: [number, number] }
                      )[];
                  };
                  Upgrade: {
                      dependencies: string[];
                      modules: string[];
                      package: string;
                      ticket: | { $kind: "GasCoin"; GasCoin: true }
                      | { $kind: "Input"; Input: number; type?: "pure" }
                      | { $kind: "Input"; Input: number; type?: "object" }
                      | { $kind: "Result"; Result: number }
                      | { $kind: "NestedResult"; NestedResult: [number, number] };
                  };
              },
              | "MoveCall"
              | "TransferObjects"
              | "SplitCoins"
              | "MergeCoins"
              | "Publish"
              | "MakeMoveVec"
              | "Upgrade"
              | "$Intent",
          >[];
          expiration?: | EnumOutputShapeWithKeys<
              { Epoch: string
              | number; None: true },
              "None" | "Epoch",
          >
          | null;
          gasData: {
              budget: string | number | null;
              owner: string | null;
              payment:
                  | { digest: string; objectId: string; version: string
                  | number }[]
                  | null;
              price: string | number | null;
          };
          inputs: EnumOutputShapeWithKeys<
              {
                  Object: EnumOutputShapeWithKeys<
                      {
                          ImmOrOwnedObject: {
                              digest: string;
                              objectId: string;
                              version: string
                              | number;
                          };
                          Receiving: {
                              digest: string;
                              objectId: string;
                              version: string
                              | number;
                          };
                          SharedObject: {
                              initialSharedVersion: string
                              | number;
                              mutable: boolean;
                              objectId: string;
                          };
                      },
                      "ImmOrOwnedObject"
                      | "SharedObject"
                      | "Receiving",
                  >;
                  Pure: { bytes: string };
                  UnresolvedObject: {
                      digest?: string | null;
                      initialSharedVersion?: string | number | null;
                      mutable?: boolean | null;
                      objectId: string;
                      version?: string | number | null;
                  };
                  UnresolvedPure: { value: unknown };
              },
              "Pure"
              | "Object"
              | "UnresolvedPure"
              | "UnresolvedObject",
          >[];
          sender?: string | null;
          version: 2;
      }

    • Derive transaction digest

      Parameters

      Returns Promise<string>

    • Ensures that:

      • All objects have been fully resolved to a specific version
      • All pure inputs have been serialized to bytes
      • All async thunks have been fully resolved
      • All transaction intents have been resolved
        • The gas payment, budget, and price have been set
      • The transaction sender has been set

      When true, the transaction will always be built to the same bytes and digest (unless the transaction is mutated)

      Returns boolean

    • Parameters

      • __namedParameters:
            | {
                arguments?: (SerializedBcs<any, any> | TransactionArgument)[];
                function: string;
                module: string;
                package: string;
                typeArguments?: string[];
            }
            | {
                arguments?: (SerializedBcs<any, any> | TransactionArgument)[];
                target: string;
                typeArguments?: string[];
            }

      Returns TransactionResult

    • Add a new object input to the transaction using the fully-resolved object reference. If you only have an object ID, use builder.object(id) instead.

      Parameters

      • ...args: [{ digest: string; objectId: string; version: string | number }]

      Returns { $kind: "Input"; Input: number; type?: "object" }

    • Parameters

      • __namedParameters: { dependencies: string[]; modules: string[] | number[][] }

      Returns TransactionResult

    • Add a new receiving input to the transaction using the fully-resolved object reference. If you only have an object ID, use builder.object(id) instead.

      Parameters

      • ...args: [{ digest: string; objectId: string; version: string | number }]

      Returns { $kind: "Input"; Input: number; type?: "object" }

    • Returns string

      Use toJSON instead. For synchronous serialization, you can use getData()

    • Parameters

      • Optionalexpiration:
            | EnumSchemaInput<
                {
                    Epoch: SchemaWithPipe<
                        readonly [
                            UnionSchema<
                                [
                                    StringSchema<undefined>,
                                    SchemaWithPipe<
                                        readonly [
                                            NumberSchema<undefined>,
                                            IntegerAction<number, undefined>,
                                        ],
                                    >,
                                ],
                                undefined,
                            >,
                            CheckAction<string | number, "Invalid u64">,
                        ],
                    >;
                    None: LiteralSchema<true, undefined>;
                },
            >
            | null

      Returns void

    • Parameters

      • budget: string | number | bigint

      Returns void

    • Parameters

      • budget: string | number | bigint

      Returns void

    • Parameters

      • owner: string

      Returns void

    • Parameters

      • payments: { digest: string; objectId: string; version: string | number }[]

      Returns void

    • Parameters

      • price: string | number | bigint

      Returns void

    • Parameters

      • sender: string

      Returns void

    • Sets the sender only if it has not already been set. This is useful for sponsored transaction flows where the sender may not be the same as the signer address.

      Parameters

      • sender: string

      Returns void

    • Add a new shared object input to the transaction using the fully-resolved shared object reference. If you only have an object ID, use builder.object(id) instead.

      Parameters

      • ...args: [{ initialSharedVersion: string | number; mutable: boolean; objectId: string }]

      Returns { $kind: "Input"; Input: number; type?: "object" }

    • Build the transaction to BCS bytes, and sign it with the provided keypair.

      Parameters

      • options: SignOptions

      Returns Promise<SignatureWithBytes>

    • Type Parameters

      Parameters

      Returns { $kind: "Result"; Result: number } & {
          [K in string | number | symbol]: {
              $kind: "NestedResult";
              NestedResult: [number, number];
          }
      }

    • Parameters

      • __namedParameters: {
            dependencies: string[];
            modules: string[] | number[][];
            package: string;
            ticket: string | TransactionObjectArgument;
        }

      Returns TransactionResult

    • Converts from a serialized transaction format to a Transaction class. There are two supported serialized formats:

      • A string returned from Transaction#serialize. The serialized format must be compatible, or it will throw an error.
      • A byte array (or base64-encoded bytes) containing BCS transaction data.

      Parameters

      • transaction: string | Uint8Array<ArrayBufferLike> | TransactionLike

      Returns Transaction

    • Converts from a serialize transaction kind (built with build({ onlyTransactionKind: true })) to a Transaction class. Supports either a byte array, or base64-encoded bytes.

      Parameters

      • serialized: string | Uint8Array<ArrayBufferLike>

      Returns Transaction