Credential
@harmoniclabs/cardano-ledger-ts • Docs
@harmoniclabs/cardano-ledger-ts / Credential
Class: Credential<T>
Type Parameters
• T extends CredentialType
= CredentialType
Implements
ToCbor
ToData
Cloneable
<Credential
<T
>>
Constructors
new Credential()
new Credential<
T
>(type
,hash
):Credential
<T
>
Parameters
• type: T
• hash: Hash28
Returns
Credential
<T
>
Defined in
src/credentials/Credential.ts:24
Properties
hash
readonly
hash:T
extendsKeyHash
?PubKeyHash
:ValidatorHash
Defined in
src/credentials/Credential.ts:22
type
readonly
type:T
Defined in
src/credentials/Credential.ts:21
Accessors
fake
get
static
fake():Credential
<KeyHash
>
Returns
Defined in
src/credentials/Credential.ts:58
Methods
clone()
clone():
Credential
<T
>
Returns
Credential
<T
>
Implementation of
Cloneable.clone
Defined in
src/credentials/Credential.ts:50
toCbor()
toCbor():
CborString
Returns
CborString
Implementation of
ToCbor.toCbor
Defined in
src/credentials/Credential.ts:100
toCborObj()
toCborObj():
CborObj
Returns
CborObj
Implementation of
ToCbor.toCborObj
Defined in
src/credentials/Credential.ts:104
toData()
toData(
_v
?):DataConstr
Parameters
• _v?: any
Returns
DataConstr
Implementation of
ToData.toData
Defined in
src/credentials/Credential.ts:66
toJson()
toJson():
object
Returns
object
credentialType
credentialType:
string
hash
hash:
string
Defined in
src/credentials/Credential.ts:131
fromCbor()
static
fromCbor(cStr
):Credential
<CredentialType
>
Parameters
• cStr: CanBeCborString
Returns
Defined in
src/credentials/Credential.ts:112
fromCborObj()
static
fromCborObj(cObj
):Credential
<CredentialType
>
Parameters
• cObj: CborObj
Returns
Defined in
src/credentials/Credential.ts:116
keyHash()
static
keyHash(hash
):Credential
<KeyHash
>
Parameters
• hash: string
| Uint8Array
| Hash28
Returns
Defined in
src/credentials/Credential.ts:80
pubKey()
static
pubKey(hash
):Credential
<KeyHash
>
Parameters
• hash: string
| Uint8Array
| Hash28
Returns
Deprecated
use keyHash
instead
Defined in
src/credentials/Credential.ts:75
script()
static
script(hash
):Credential
<Script
>
Parameters
• hash: string
| Uint8Array
| Hash28