StakeDelegation.deserialize constructor

StakeDelegation.deserialize(
  1. CborListValue cbor
)

Deserializes a StakeDelegation object from its CBOR representation.

Implementation

factory StakeDelegation.deserialize(CborListValue cbor) {
  CertificateType.deserialize(
    cbor.getIndex(0),
    validate: CertificateType.stakeDelegation,
  );
  return StakeDelegation(
    stakeCredential: StakeCred.deserialize(cbor.getIndex(1)),
    poolKeyHash: Ed25519PoolKeyHash.deserialize(cbor.getIndex(2)),
  );
}