BlockHeaderRaw.fromJson constructor

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

Implementation

factory BlockHeaderRaw.fromJson(Map<String, dynamic> json) {
  return BlockHeaderRaw(
      witnessAddress: BytesUtils.tryFromHexString(json["witness_address"]),
      number: BigintUtils.parse(json["number"]),
      parentHash: BytesUtils.tryFromHexString(json["parentHash"]),
      version: IntUtils.parse(json["version"]),
      timestamp: BigintUtils.parse(json["timestamp"]),
      txTrieRoot: BytesUtils.tryFromHexString(json["txTrieRoot"]),
      witnessId: BigintUtils.tryParse(json["witnessId"]),
      accountStateRoot:
          BytesUtils.tryFromHexString(json["accountStateRoot"]));
}