Skip to main content

Hash32

@harmoniclabs/cardano-ledger-ts • Docs


@harmoniclabs/cardano-ledger-ts / Hash32

Class: Hash32

Extends​

Extended by​

Constructors​

new Hash32()​

new Hash32(bs, className): Hash32

Parameters​

• bs: string | Uint8Array | Hash32

• className: string = "Hash32"

Returns​

Hash32

Overrides​

Hash.constructor

Defined in​

src/hashes/Hash32/Hash32.ts:25

Accessors​

_bytes​

get protected _bytes(): Uint8Array

Returns​

Uint8Array

Inherited from​

Hash._bytes

Defined in​

src/hashes/Hash.ts:45


_str​

get protected _str(): string

Returns​

string

Inherited from​

Hash._str

Defined in​

src/hashes/Hash.ts:67


asBytes​

get asBytes(): Uint8Array

Deprecated​

use toBuffer() instead

Returns​

Uint8Array

Inherited from​

Hash.asBytes

Defined in​

src/hashes/Hash.ts:138


asString​

get asString(): string

Deprecated​

use toString() instead

Returns​

string

Inherited from​

Hash.asString

Defined in​

src/hashes/Hash.ts:125

Methods​

clone()​

clone(): Hash

Returns​

Hash

Inherited from​

Hash.clone

Defined in​

src/hashes/Hash.ts:156


toBuffer()​

toBuffer(): Uint8Array

Returns​

Uint8Array

Inherited from​

Hash.toBuffer

Defined in​

src/hashes/Hash.ts:143


toBytes()​

toBytes(): Uint8Array

Returns​

Uint8Array

Deprecated​

use toBuffer() instead

Inherited from​

Hash.toBytes

Defined in​

src/hashes/Hash.ts:151


toCbor()​

toCbor(): CborString

Returns​

CborString

Inherited from​

Hash.toCbor

Defined in​

src/hashes/Hash.ts:161


toCborObj()​

toCborObj(): CborObj

Returns​

CborObj

Inherited from​

Hash.toCborObj

Defined in​

src/hashes/Hash.ts:165


toData()​

toData(_version?): Data

Parameters​

• _version?: ToDataVersion

Returns​

Data

Inherited from​

Hash.toData

Defined in​

src/hashes/Hash.ts:182


toString()​

toString(): string

Returns a string representation of an object.

Returns​

string

Inherited from​

Hash.toString

Defined in​

src/hashes/Hash.ts:130


fromAscii()​

static fromAscii(asciiStr): Hash

Parameters​

• asciiStr: string

Returns​

Hash

Inherited from​

Hash.fromAscii

Defined in​

src/hashes/Hash.ts:187


fromCbor()​

static fromCbor(cStr): Hash32

Parameters​

• cStr: CanBeCborString

Returns​

Hash32

Overrides​

Hash.fromCbor

Defined in​

src/hashes/Hash32/Hash32.ts:35


fromCborObj()​

static fromCborObj(cObj): Hash32

Parameters​

• cObj: CborObj

Returns​

Hash32

Overrides​

Hash.fromCborObj

Defined in​

src/hashes/Hash32/Hash32.ts:39


isStrictInstance()​

static isStrictInstance(bs): bs is Hash

Parameters​

• bs: any

Returns​

bs is Hash

Inherited from​

Hash.isStrictInstance

Defined in​

src/hashes/Hash.ts:40


isValidHexValue()​

static isValidHexValue(str): boolean

Parameters​

• str: string

Returns​

boolean

Inherited from​

Hash.isValidHexValue

Defined in​

src/hashes/Hash.ts:197


toAscii()​

static toAscii(bStr): string

Parameters​

• bStr: Hash

Returns​

string

Inherited from​

Hash.toAscii

Defined in​

src/hashes/Hash.ts:192