Skip to main content

PublicKey

@harmoniclabs/cardano-ledger-tsDocs


@harmoniclabs/cardano-ledger-ts / PublicKey

Class: PublicKey

Extends

Constructors

new PublicKey()

new PublicKey(pubKey): PublicKey

Parameters

pubKey: string | Uint8Array | Hash32

Returns

PublicKey

Overrides

Hash32.constructor

Defined in

src/credentials/PublicKey.ts:11

Properties

hash

readonly hash: PubKeyHash

Defined in

src/credentials/PublicKey.ts:9

Accessors

_bytes

get protected _bytes(): Uint8Array

Returns

Uint8Array

Inherited from

Hash32._bytes

Defined in

src/hashes/Hash.ts:45


_str

get protected _str(): string

Returns

string

Inherited from

Hash32._str

Defined in

src/hashes/Hash.ts:67


asBytes

get asBytes(): Uint8Array

Deprecated

use toBuffer() instead

Returns

Uint8Array

Inherited from

Hash32.asBytes

Defined in

src/hashes/Hash.ts:138


asString

get asString(): string

Deprecated

use toString() instead

Returns

string

Inherited from

Hash32.asString

Defined in

src/hashes/Hash.ts:125

Methods

clone()

clone(): Hash

Returns

Hash

Inherited from

Hash32.clone

Defined in

src/hashes/Hash.ts:156


toBuffer()

toBuffer(): Uint8Array

Returns

Uint8Array

Inherited from

Hash32.toBuffer

Defined in

src/hashes/Hash.ts:143


toBytes()

toBytes(): Uint8Array

Returns

Uint8Array

Deprecated

use toBuffer() instead

Inherited from

Hash32.toBytes

Defined in

src/hashes/Hash.ts:151


toCbor()

toCbor(): CborString

Returns

CborString

Inherited from

Hash32.toCbor

Defined in

src/hashes/Hash.ts:161


toCborObj()

toCborObj(): CborObj

Returns

CborObj

Inherited from

Hash32.toCborObj

Defined in

src/hashes/Hash.ts:165


toData()

toData(_version?): Data

Parameters

_version?: ToDataVersion

Returns

Data

Inherited from

Hash32.toData

Defined in

src/hashes/Hash.ts:182


toString()

toString(): string

Returns a string representation of an object.

Returns

string

Inherited from

Hash32.toString

Defined in

src/hashes/Hash.ts:130


fromAscii()

static fromAscii(asciiStr): Hash

Parameters

asciiStr: string

Returns

Hash

Inherited from

Hash32.fromAscii

Defined in

src/hashes/Hash.ts:187


fromCbor()

static fromCbor(cStr): PublicKey

Parameters

cStr: CanBeCborString

Returns

PublicKey

Overrides

Hash32.fromCbor

Defined in

src/credentials/PublicKey.ts:40


fromCborObj()

static fromCborObj(cObj): PublicKey

Parameters

cObj: CborObj

Returns

PublicKey

Overrides

Hash32.fromCborObj

Defined in

src/credentials/PublicKey.ts:44


isStrictInstance()

static isStrictInstance(bs): bs is Hash

Parameters

bs: any

Returns

bs is Hash

Inherited from

Hash32.isStrictInstance

Defined in

src/hashes/Hash.ts:40


isValidHexValue()

static isValidHexValue(str): boolean

Parameters

str: string

Returns

boolean

Inherited from

Hash32.isValidHexValue

Defined in

src/hashes/Hash.ts:197


toAscii()

static toAscii(bStr): string

Parameters

bStr: Hash

Returns

string

Inherited from

Hash32.toAscii

Defined in

src/hashes/Hash.ts:192