sawtooth.endpoint_client module

class sawtooth.endpoint_client.EndpointClient(base_url)[source]

Bases: sawtooth.client.SawtoothClient

The EndpointClient is not like other SawtoothClient-derived classes in that it doesn’t (currently) support actually performing transactions on the EndpointRegistryTransaction store. It is a read-only client.

Its main purpose in life is to make it easy to discover the validators in the network, or maybe more precisely, the list of endpoints that have registered with a validator.


Retrieves the endpoint list from the validator.

Returns:A list of endpoints. Each endpoint is an OrderedDict of values from EndpointRegistryTransaction.

A convenience function that is a specialization of endpoint_list that extracts the ‘Host’ and ‘HttpPort’ values for each endpoint and concatenates them to make a list of validator URLs.

Returns:A list of validator URLS, for example [‘‘, ...]