package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-libs.base/Tezos_base/P2p_point/Id/index.html

Module P2p_point.IdSource

Sourcetype addr_port_id = {
  1. addr : string;
    (*

    String representation of an address. This address can be an IPv4 or IPv6 or a domain.

    *)
  2. port : int option;
    (*

    If specified, a port number in 0-65535.

    *)
  3. peer_id : P2p_peer_id.t option;
    (*

    If specified, a peer_id. This field is given by the user to ensure the identity of the node behind the address.

    *)
}
Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval pp : Format.formatter -> t -> unit
Sourceval pp_opt : Format.formatter -> t option -> unit
Sourceval pp_list : Format.formatter -> t list -> unit
Sourceval of_string_exn : ?default_port:int -> string -> t
Sourceval of_string : ?default_port:int -> string -> (t, string) result
Sourceval to_string : t -> string
Sourceval encoding : t Data_encoding.t
Sourceval is_local : t -> bool
Sourceval is_global : t -> bool
Sourceval rpc_arg : t Tezos_rpc.Arg.t
Sourcetype parsing_error =
  1. | Port_not_in_range of int
  2. | Bad_id_format of string
  3. | Bad_format
Sourceval string_of_parsing_error : parsing_error -> string
Sourceval parse_addr_port_id : string -> (addr_port_id, parsing_error) result

parse_addr_port_id addr_port_id splits the addr_port_id into an addr, a port and an id (as a b58 hash). Both port and id are optional. This function checks that the port is between 0-65535. The character ':' separates the addr and the port while the character '#' separates the addr or the port from the id. The function assumes that addr can be either an Ipv6 address, an Ipv4 address or a domain. The address is formatted so that it can be given to Lwt_unix.getaddrinfo. This means that square brackets around ipv6 addresses are removed.

Sourceval addr_port_id_to_string : addr_port_id -> string
Sourceval addr_port_id_encoding : addr_port_id Data_encoding.t
Sourceval pp_addr_port_id : Format.formatter -> addr_port_id -> unit
Sourceval hash : t -> int
OCaml

Innovation. Community. Security.