Helios API/ API Reference/ Classes/

DCert

A DCert represents a staking action (eg. withdrawing rewards, delegating to another pool).

Hierarchy

Index

Constructors

constructor

new DCert(certType)

Parameters

NameType
certTypenumber

Overrides

CborData.constructor

Accessors

certType

get certType(): number

Get certificate type.

Returns

number

credentialType

get credentialType(): number

Get stake credential type.

Returns

number

stakeHash

get stakeHash(): PubKeyHash | StakingValidatorHash

Get stake hash.

Returns

PubKeyHash | StakingValidatorHash

Methods

dump

dump(): any

Returns

any

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

CborData.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

CborData.toCborHex

toData

toData(): ConstrData

Returns

ConstrData

typeToCbor

typeToCbor(): number[]

Returns

number[]

fromCbor

Static fromCbor(raw): DCert

Parameters

NameType
rawstring | number[]

Returns

DCert

fromJson

Static fromJson(json): DCert

Create a DCert from a given json parameter.

Parameters

NameType
jsonstring | { credential: { hash: string ; type: 0 | 1 } ; poolHash?: string ; type: 0 | 2 | 1 }

Returns

DCert

fromUplcData

Static fromUplcData(data): DCert

Parameters

NameType
dataUplcData

Returns

DCert