2018-01-24 15:48:25 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2018-02-06 00:17:03 +04:00
|
|
|
(* Copyright (c) 2014 - 2018. *)
|
2018-01-24 15:48:25 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
type t = Ipaddr.V6.t
|
|
|
|
|
|
|
|
let encoding =
|
|
|
|
let open Data_encoding in
|
|
|
|
splitted
|
|
|
|
~json:begin
|
|
|
|
conv
|
|
|
|
Ipaddr.V6.to_string
|
|
|
|
Ipaddr.V6.of_string_exn
|
|
|
|
string
|
|
|
|
end
|
|
|
|
~binary:begin
|
|
|
|
conv
|
|
|
|
Ipaddr.V6.to_bytes
|
|
|
|
Ipaddr.V6.of_bytes_exn
|
|
|
|
string
|
|
|
|
end
|
|
|
|
|
|
|
|
type port = int
|