DRepRegistration.deserialize constructor

DRepRegistration.deserialize(
  1. CborListValue<CborObject> cbor
)

Implementation

factory DRepRegistration.deserialize(CborListValue cbor) {
  CertificateType.deserialize(cbor.elementAt<CborIntValue>(0),
      validate: CertificateType.dRepRegistration);
  return DRepRegistration(
      votingCredential:
          Credential.deserialize(cbor.elementAt<CborListValue>(1)),
      coin: cbor.elementAsInteger(2),
      anchor: cbor
          .elementAt<CborListValue?>(3)
          ?.convertTo<Anchor, CborListValue>((e) => Anchor.deserialize(e)));
}