Class BidAddr

Represents a bid address, which stores information such as unified, validator, delegator, or credit data types.

Hierarchy

  • BidAddr

Constructors

Properties

delegatorAccount?: Hash

Delegator account hash for DelegatedAccountTag addresses.

delegatorPurseAddress?: string

Delegator purse address for DelegatedPurseTag addresses.

eraId?: number

Era ID for CreditTag addresses.

Private field indicating the tag type of the BidAddr.

unified?: Hash

Unified hash for UnifiedTag addresses.

validator?: Hash

Validator hash for ValidatorTag addresses.

Methods

  • Converts the BidAddr to a byte array.

    Returns

    The byte array representation of the BidAddr.

    Throws

    If the BidAddr type is unexpected.

    Returns Uint8Array

  • Converts the BidAddr to its hexadecimal string representation, ensuring proper formatting.

    Returns

    The hexadecimal string representation of the BidAddr.

    Throws

    If the BidAddr type is unexpected or required fields are missing.

    Returns string

  • Converts the BidAddr to its JSON representation.

    Returns

    The JSON string representation.

    Returns string

  • Returns a prefixed string representation of the BidAddr.

    Returns

    The prefixed string representation.

    Returns string

  • Validates and returns the BidAddrTag from a numeric value.

    Returns

    The corresponding BidAddrTag.

    Throws

    If the tag value is invalid.

    Parameters

    • tag: number

      The numeric tag value to validate.

    Returns BidAddrTag

  • Creates a BidAddr from a hexadecimal string.

    Returns

    A new BidAddr instance.

    Throws

    If the format is invalid.

    Throws

    If an unexpected tag is encountered.

    Parameters

    • source: string

      The hexadecimal string representation of the BidAddr.

    Returns BidAddr

Generated using TypeDoc