Round the current running result to an exponential power.

Input: The current running numerical result.

Returns: The input raised to an exponential power.

Example: Raise 2 to the power of 3, 2^3

{"tasks":[{"valueTask":{"value":2}},{"powTask":{"scalar":3}}]}

Implements

Constructors

  • Constructs a new PowTask.

    Parameters

    • Optional properties: IPowTask

      Properties to set

    Returns PowTask

Properties

Exponent?: "big" | "aggregatorPubkey" | "scalar"

PowTask Exponent.

aggregatorPubkey?: string

Take the working value to the exponent of the aggregators value.

big?: string

A stringified big.js. Accepts variable expansion syntax.

scalar?: number

Take the working value to the exponent of value.

Methods

  • Converts this PowTask to JSON.

    Returns {
        [k: string]: any;
    }

    JSON object

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

    Parameters

    • Optional properties: IPowTask

      Properties to set

    Returns PowTask

    PowTask instance

  • Decodes a PowTask 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 PowTask

    PowTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

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

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns PowTask

    PowTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

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

    Parameters

    • message: IPowTask

      PowTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

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

    Parameters

    • message: IPowTask

      PowTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

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

    Parameters

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

      Plain object

      • [k: string]: any

    Returns PowTask

    PowTask

  • Gets the default type url for PowTask

    Parameters

    • Optional typeUrlPrefix: string

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

    Returns string

    The default type url

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

    Parameters

    • message: PowTask

      PowTask

    • Optional options: IConversionOptions

      Conversion options

    Returns {
        [k: string]: any;
    }

    Plain object

    • [k: string]: any
  • Verifies a PowTask 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