Skip to main content

StakeAddress

@harmoniclabs/cardano-ledger-tsDocs


@harmoniclabs/cardano-ledger-ts / StakeAddress

Class: StakeAddress<T>

Type Parameters

T extends StakeAddressType = StakeAddressType

Constructors

new StakeAddress()

new StakeAddress<T>(network, credentials, type?): StakeAddress<T>

Parameters

network: NetworkT

credentials: Hash28

type?: T

Returns

StakeAddress<T>

Defined in

src/ledger/StakeAddress.ts:26

Properties

credentials

readonly credentials: StakeAddressCredentials<T>

Defined in

src/ledger/StakeAddress.ts:24


network

readonly network: NetworkT

Defined in

src/ledger/StakeAddress.ts:22


type

readonly type: T

Defined in

src/ledger/StakeAddress.ts:23

Methods

clone()

clone(): StakeAddress<T>

Returns

StakeAddress<T>

Defined in

src/ledger/StakeAddress.ts:66


toBytes()

toBytes(): Uint8Array

Returns

Uint8Array

Defined in

src/ledger/StakeAddress.ts:101


toCborObj()

toCborObj(): CborObj

Returns

CborObj

Defined in

src/ledger/StakeAddress.ts:129


toCredential()

toCredential(): Credential<CredentialType>

Returns

Credential<CredentialType>

Defined in

src/ledger/StakeAddress.ts:146


toStakeCredentials()

toStakeCredentials(): StakeCredentials<T>

Returns

StakeCredentials<T>

Defined in

src/ledger/StakeAddress.ts:154


toString()

toString(): StakeAddressBech32

Returns

StakeAddressBech32

Defined in

src/ledger/StakeAddress.ts:75


fromBytes()

static fromBytes(bs, netwok, type): StakeAddress<StakeAddressType>

Parameters

bs: string | Uint8Array | byte[]

netwok: NetworkT = "mainnet"

type: StakeAddressType = "stakeKey"

Returns

StakeAddress<StakeAddressType>

Defined in

src/ledger/StakeAddress.ts:106


fromCbor()

static fromCbor(cStr): StakeAddress<StakeAddressType>

Parameters

cStr: CanBeCborString

Returns

StakeAddress<StakeAddressType>

Defined in

src/ledger/StakeAddress.ts:134


fromCborObj()

static fromCborObj(cObj): StakeAddress<StakeAddressType>

Parameters

cObj: CborObj

Returns

StakeAddress<StakeAddressType>

Defined in

src/ledger/StakeAddress.ts:138


fromString()

fromString(str)

static fromString(str): StakeAddress<StakeAddressType>

Parameters

str: string

Returns

StakeAddress<StakeAddressType>

Defined in

src/ledger/StakeAddress.ts:83

fromString(str, type)

static fromString<T>(str, type): StakeAddress<T>

Type Parameters

T extends StakeAddressType = StakeAddressType

Parameters

str: string

type: T

Returns

StakeAddress<T>

Defined in

src/ledger/StakeAddress.ts:84