Documentation

    Variable ArgumentsConst

    Arguments: {
        object: {
            clock(): TransactionObjectArgument;
            denyList(): TransactionObjectArgument;
            option(
                __namedParameters: {
                    type: string;
                    value: null | TransactionObjectInput;
                },
            ): (tx: Transaction) => TransactionResult;
            random(): TransactionObjectArgument;
            system(): TransactionObjectArgument;
            (value: TransactionObjectInput): TransactionObjectArgument;
        };
        objectRef: (
            ...args: [
                { digest: string; objectId: string; version: string
                | number },
            ],
        ) => (
            tx: Transaction,
        ) => { $kind: "Input"; Input: number; type?: "object" };
        pure: {
            id: (
                value: string,
            ) => (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
                value: undefined | null | ShapeFromPureTypeName<Type>,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
            ): (
                tx: Transaction,
            ) =>
                | { $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,
                value: Iterable<ShapeFromPureTypeName<Type>, any, any> & {
                    length: number;
                },
            ): (
                tx: Transaction,
            ) =>
                | { $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] };
            <T extends PureTypeName>(
                type: T extends PureTypeName ? ValidPureTypeName<T<T>> : T,
                value: ShapeFromPureTypeName<T>,
            ): T;
            (
                value: Uint8Array<ArrayBufferLike> | SerializedBcs<any, any>,
            ): (
                tx: Transaction,
            ) =>
                | { $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] };
        };
        receivingRef: (
            ...args: [
                { digest: string; objectId: string; version: string
                | number },
            ],
        ) => (
            tx: Transaction,
        ) => { $kind: "Input"; Input: number; type?: "object" };
        sharedObjectRef: (
            ...args: [
                {
                    initialSharedVersion: string
                    | number;
                    mutable: boolean;
                    objectId: string;
                },
            ],
        ) => (
            tx: Transaction,
        ) => { $kind: "Input"; Input: number; type?: "object" };
    } = ...

    Type declaration

    • object: {
          clock(): TransactionObjectArgument;
          denyList(): TransactionObjectArgument;
          option(
              __namedParameters: {
                  type: string;
                  value: null | TransactionObjectInput;
              },
          ): (tx: Transaction) => TransactionResult;
          random(): TransactionObjectArgument;
          system(): TransactionObjectArgument;
          (value: TransactionObjectInput): TransactionObjectArgument;
      }
    • objectRef: (
          ...args: [
              { digest: string; objectId: string; version: string
              | number },
          ],
      ) => (tx: Transaction) => { $kind: "Input"; Input: number; type?: "object" }
    • pure: {
          id: (
              value: string,
          ) => (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
              value: undefined | null | ShapeFromPureTypeName<Type>,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
          ): (
              tx: Transaction,
          ) =>
              | { $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,
              value: Iterable<ShapeFromPureTypeName<Type>, any, any> & {
                  length: number;
              },
          ): (
              tx: Transaction,
          ) =>
              | { $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] };
          <T extends PureTypeName>(
              type: T extends PureTypeName ? ValidPureTypeName<T<T>> : T,
              value: ShapeFromPureTypeName<T>,
          ): T;
          (
              value: Uint8Array<ArrayBufferLike> | SerializedBcs<any, any>,
          ): (
              tx: Transaction,
          ) =>
              | { $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] };
      }
    • receivingRef: (
          ...args: [
              { digest: string; objectId: string; version: string
              | number },
          ],
      ) => (tx: Transaction) => { $kind: "Input"; Input: number; type?: "object" }
    • sharedObjectRef: (
          ...args: [
              {
                  initialSharedVersion: string
                  | number;
                  mutable: boolean;
                  objectId: string;
              },
          ],
      ) => (tx: Transaction) => { $kind: "Input"; Input: number; type?: "object" }
    MMNEPVFCICPMFPCPTTAAATR