navio-blsct
    Preparing search index...

    Class ChildKey

    Represents a child key. A child key is a Scalar and introduces no new functionality; it serves purely as a semantic alias. BlindingKey, TokenKey and TxKey are exclusively derived from a ChildKey.

    Examples:

    const { Scalar, ChildKey } = require('navio-blsct')
    const s = Scalar.random()
    const ck = new ChildKey(s)
    ck.toBlindingKey()
    ck.toTokenKey()
    ck.toTxKey()

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    obj: any
    objSize: number

    Methods

    • Returns if the scalar is equal to the provided scalar.

      Parameters

      • other: Scalar

        The scalar to compare with.

      Returns boolean

      true if the scalars are equal, false otherwise.

    • Returns the underlying C++ object, transferring ownership from this instance to the caller.

      Returns any

      The underlying object of the instance.

    • Returns the size of the underlying C++ object.

      Returns number

      The size of the underlying C++ object in bytes.

    • Converts the scalar to an integer. *

      Returns number

      The scalar as a number.

    • Returns a string representation of the instance.

      Returns string

      A string representation of the instance.

    • Returnsthe underlying C++ object.

      Returns any

      The underlying C++ object.

    • Deserializes a hexadecimal string into a Scalar instance.

      Parameters

      • this: new (obj: any) => Scalar
      • hex: string

        The hexadecimal string to convert.

      Returns Scalar

      The Scalar instance represented by the input string.

    • Constucts a new instance using the provided object.

      Type Parameters

      Parameters

      • this: new (obj: any, objSize?: number) => T
      • obj: any

        The object to use for the new instance.

      Returns T

      A new instance of the class.

    • Constructs a new instance using the provided object and size.

      Type Parameters

      Parameters

      • this: new (obj: any) => T
      • obj: any

        The object to use for the new instance.

      • objSize: number

        The size of the object.

      Returns T

      A new instance of the class.