StakeDelegation.fromJson constructor

StakeDelegation.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory StakeDelegation.fromJson(Map<String, dynamic> json) {
  final Map<String, dynamic> correctJson = json["stake_delegation"] ?? json;
  return StakeDelegation(
      stakeCredential: StakeCred.fromJson(correctJson["stake_credential"]),
      poolKeyHash: Ed25519PoolKeyHash.fromHex(correctJson["pool_keyhash"]));
}