This task will multiply a numerical input by a scalar value from a job of subtasks, an aggregator, or a big.

Input: The current running numerical result output from a scalar value, an aggregator, a job of subtasks or a big.

Returns: A numerical result.

Example: Returns the numerical result by multiplying by a job of subtasks.

{"tasks":[{"valueTask":{"value":100}},{"multiplyTask":{"job":{"tasks":[{"valueTask":{"value":10}}]}}}]}

Example: Returns the numerical result by multiplying by an aggregator.

{"tasks":[{"valueTask":{"value":100}},{"multiplyTask":{"aggregatorPubkey":"GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"}}]}

Example: Returns the numerical result by multiplying by a big.

{"tasks":[{"cacheTask":{"cacheItems":[{"variableName":"TEN","job":{"tasks":[{"valueTask":{"value":10}}]}}]}},{"valueTask":{"value":100}},{"multiplyTask":{"big":"${TEN}"}}]}

Implements

Constructors

  • Constructs a new MultiplyTask.

    Parameters

    Returns MultiplyTask

Properties

Multiple?: "big" | "aggregatorPubkey" | "scalar" | "job"

MultiplyTask Multiple.

aggregatorPubkey?: string

Specifies an aggregator to multiply by.

big?: string

A stringified big.js. Accepts variable expansion syntax.

job?: IOracleJob

A job whose result is computed before multiplying our numerical input by that result.

scalar?: number

Specifies a scalar to multiply by.

Methods

  • Converts this MultiplyTask to JSON.

    Returns {
        [k: string]: any;
    }

    JSON object

    • [k: string]: any
  • Creates a new MultiplyTask instance using the specified properties.

    Parameters

    Returns MultiplyTask

    MultiplyTask instance

  • Decodes a MultiplyTask message from the specified reader or buffer.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • Optional length: number

      Message length if known beforehand

    Returns MultiplyTask

    MultiplyTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Decodes a MultiplyTask message from the specified reader or buffer, length delimited.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns MultiplyTask

    MultiplyTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Encodes the specified MultiplyTask message. Does not implicitly verify messages.

    Parameters

    • message: IMultiplyTask

      MultiplyTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Encodes the specified MultiplyTask message, length delimited. Does not implicitly verify messages.

    Parameters

    • message: IMultiplyTask

      MultiplyTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Creates a MultiplyTask message from a plain object. Also converts values to their respective internal types.

    Parameters

    • object: {
          [k: string]: any;
      }

      Plain object

      • [k: string]: any

    Returns MultiplyTask

    MultiplyTask

  • Gets the default type url for MultiplyTask

    Parameters

    • Optional typeUrlPrefix: string

      your custom typeUrlPrefix(default "type.googleapis.com")

    Returns string

    The default type url

  • Creates a plain object from a MultiplyTask message. Also converts values to other types if specified.

    Parameters

    • message: MultiplyTask

      MultiplyTask

    • Optional options: IConversionOptions

      Conversion options

    Returns {
        [k: string]: any;
    }

    Plain object

    • [k: string]: any
  • Verifies a MultiplyTask message.

    Parameters

    • message: {
          [k: string]: any;
      }

      Plain object to verify

      • [k: string]: any

    Returns string

    null if valid, otherwise the reason why it is not