Welcome to SingularityNET Agent’s documentation!

Contents:

Welcome to the SingularNET docs

class sn_agent.network.base.NetworkABC(app)[source]
advertise_service(service: sn_agent.ontology.service_descriptor.ServiceDescriptor)[source]

Given an ontology, advertise it as a service that the agent provides :param service: a service objects defining a service spec

find_service_providers(service: sn_agent.ontology.service_descriptor.ServiceDescriptor) → list[source]

Called by the UI as well as find_provider - should return a list that contains information about all the providers that have indicated that they can proved the designated service. :param service: :return: a list of external agents which provide the service requested

get_network_status() → sn_agent.network.enum.NetworkStatus[source]

Determine what the current network status is (joined or not joined)

is_agent_a_member(agent: sn_agent.agent.base.AgentABC) → bool[source]

Determine what the current network status is (joined or not joined)

join_network() → bool[source]

Agent calls this the first time to connect to the network. A Private and Public key should be returned

leave_network() → bool[source]

Should this do something in the blockchain or just delete the public and private keys?

logoff_network() → bool[source]

Agent calls this to log off the network after calling network operations

logon_network() → bool[source]

Agent calls this to logon to the network prior to calling network operations

remove_service_advertisement(service: sn_agent.ontology.service_descriptor.ServiceDescriptor)[source]

Remove the advertisement of the service for a given agent :param service:

update_ontology()[source]

Updates self.ontology from the blockchain with any changes since the last time update was called.

class sn_agent.network.base.ResolverABC[source]
resolve(agent_id)[source]

Resolve the url for an agent given only its ID

Indices and tables