Function cip129DRepFromCredential

Build a CIP-129 DRep ID from a governance credential.

Prepends the appropriate 1-byte header (0x22 for key-hash, 0x23 for script-hash) before Bech32-encoding with HRP drep.

  • Parameters

    • credential: Credential

      Credential containing type and hex hash.

    Returns string

    Bech32-encoded CIP-129 DRep ID (drep1...).