Helios API/ API Reference/ Classes/

PubKeyHash

Represents a blake2b-224 hash of a PubKey

Note: A PubKeyHash can also be used as the second part of a payment Address, or to construct a StakeAddress.

Hierarchy

  • Hash

    PubKeyHash

Index

Constructors

constructor

new PubKeyHash(props)

Parameters

NameType
propsHashProps

Inherited from

Hash.constructor

Properties

bytes

Readonly bytes: number[]

Inherited from

Hash.bytes

Accessors

hex

get hex(): string

Hexadecimal representation.

Returns

string

Inherited from

Hash.hex

Methods

eq

eq(other): boolean

Parameters

NameType
otherHash

Returns

boolean

Inherited from

Hash.eq

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

Hash.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

Hash.toCborHex

toSchemaJson

toSchemaJson(): string

Returns

string

Inherited from

Hash.toSchemaJson

compare

Static compare(a, b): number

Parameters

NameType
aHash
bHash

Returns

number

Inherited from

Hash.compare

dummy

Static dummy(): PubKeyHash

Returns

PubKeyHash

fromCbor

Static fromCbor(bytes): Hash

Used internally for metadataHash and scriptDataHash

Parameters

NameType
bytesnumber[]

Returns

Hash

Inherited from

Hash.fromCbor

fromHex

Static fromHex(str): Hash

Might be needed for internal use

Parameters

NameType
strstring

Returns

Hash

Inherited from

Hash.fromHex

fromProps

Static fromProps(props): Hash

Parameters

NameType
propsHash | HashProps

Returns

Hash

Inherited from

Hash.fromProps

fromUplcCbor

Static fromUplcCbor(bytes): PubKeyHash

Parameters

NameType
bytesstring | number[]

Returns

PubKeyHash

fromUplcData

Static fromUplcData(data): PubKeyHash

Parameters

NameType
dataUplcData

Returns

PubKeyHash