Esempio n. 1
0
 public static Block FromJson(JObject json)
 {
     return(new(
                BlockIdentifier.FromJson(json["block_identifier"]),
                BlockIdentifier.FromJson(json["parent_block_identifier"]),
                (long)json["timestamp"].GetNumber(),
                json["transactions"].GetArray().Select(p => Transaction.FromJson(p)).ToArray(),
                Metadata.FromJson(json["metadata"])
                ));
 }
Esempio n. 2
0
 public static BlockTransactionRequest FromJson(JObject json)
 {
     return(new BlockTransactionRequest(NetworkIdentifier.FromJson(json["network_identifier"]),
                                        BlockIdentifier.FromJson(json["block_identifier"]),
                                        TransactionIdentifier.FromJson(json["transaction_identifier"])));
 }