navio-blsct
    Preparing search index...

    Class SubAddrId

    Represents a sub-address ID.

    Examples:

    const { SubAddrId } = require('navio-blsct')
    const x = SubAddrId.generate(123, 456)
    x
    const ser = x.serialize()
    const deser = SubAddrId.deserialize(ser)
    ser === deser.serialize() // true

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    obj: any
    objSize: number

    Methods

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

      Returns any

      The underlying object of the instance.

    • Serializes the instance to a hexadecimal string.

      Returns string

      A hexadecimal string representation of the instance.

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

      Returns number

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

    • Returns a string representation of the instance.

      Returns string

      A string representation of the instance.

    • Deserializes a SubAddrId from its hexadecimal representation.

      Parameters

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

        The hexadecimal string to deserialize.

      Returns SubAddrId

      A new SubAddrId instance.

    • 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.

    • Generates a new SubAddrId instance.

      Parameters

      • account: number

        The account for the sub-address.

      • address: number

        The address for the sub-address.

      Returns SubAddrId

      A new SubAddrId instance with the specified account and address.