Skip to main content

Hash

@harmoniclabs/cardano-ledger-tsDocs


@harmoniclabs/cardano-ledger-ts / Hash

Class: Hash

Extended by

Implements

  • Cloneable<Hash>
  • ToCbor
  • ToData

Constructors

new Hash()

new Hash(bs): Hash

Parameters

bs: string | Uint8Array

Returns

Hash

Defined in

src/hashes/Hash.ts:89

Accessors

_bytes

get protected _bytes(): Uint8Array

Returns

Uint8Array

Defined in

src/hashes/Hash.ts:45


_str

get protected _str(): string

Returns

string

Defined in

src/hashes/Hash.ts:67


asBytes

get asBytes(): Uint8Array

Deprecated

use toBuffer() instead

Returns

Uint8Array

Defined in

src/hashes/Hash.ts:138


asString

get asString(): string

Deprecated

use toString() instead

Returns

string

Defined in

src/hashes/Hash.ts:125

Methods

clone()

clone(): Hash

Returns

Hash

Implementation of

Cloneable.clone

Defined in

src/hashes/Hash.ts:156


toBuffer()

toBuffer(): Uint8Array

Returns

Uint8Array

Defined in

src/hashes/Hash.ts:143


toBytes()

toBytes(): Uint8Array

Returns

Uint8Array

Deprecated

use toBuffer() instead

Defined in

src/hashes/Hash.ts:151


toCbor()

toCbor(): CborString

Returns

CborString

Implementation of

ToCbor.toCbor

Defined in

src/hashes/Hash.ts:161


toCborObj()

toCborObj(): CborObj

Returns

CborObj

Implementation of

ToCbor.toCborObj

Defined in

src/hashes/Hash.ts:165


toData()

toData(_version?): Data

Parameters

_version?: ToDataVersion

Returns

Data

Implementation of

ToData.toData

Defined in

src/hashes/Hash.ts:182


toString()

toString(): string

Returns a string representation of an object.

Returns

string

Defined in

src/hashes/Hash.ts:130


fromAscii()

static fromAscii(asciiStr): Hash

Parameters

asciiStr: string

Returns

Hash

Defined in

src/hashes/Hash.ts:187


fromCbor()

static fromCbor(cStr): Hash

Parameters

cStr: CanBeCborString

Returns

Hash

Defined in

src/hashes/Hash.ts:170


fromCborObj()

static fromCborObj(cObj): Hash

Parameters

cObj: CborObj

Returns

Hash

Defined in

src/hashes/Hash.ts:174


isStrictInstance()

static isStrictInstance(bs): bs is Hash

Parameters

bs: any

Returns

bs is Hash

Defined in

src/hashes/Hash.ts:40


isValidHexValue()

static isValidHexValue(str): boolean

Parameters

str: string

Returns

boolean

Defined in

src/hashes/Hash.ts:197


toAscii()

static toAscii(bStr): string

Parameters

bStr: Hash

Returns

string

Defined in

src/hashes/Hash.ts:192