Ubirch Protocol Python
List of all members
API Class Reference

Detailed Description

Ubirch API accessor methods.

Inheritance diagram for API:

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self,
  env = "demo",
  debug = False 
)

Initialize the API.

Parameters
envCan be one of [prod, demo, dev]
debugPrint debug output?

Member Function Documentation

◆ deregister_identity()

Response deregister_identity (   self,
bytes  key_deregistration 
)

De-register an identity at the backend.

Deletes the public key.

Parameters
key_deregistrationThe public key signed
Returns
The response from the server

◆ get_trusted_identities_json()

Response get_trusted_identities_json (   self,
dict  get_trusted 
)

Get the trusted identities as a list in JSON format.

Parameters
get_trustedDictionary containing the identity details
Returns
The response from the server

◆ get_url()

str or None get_url (   self,
str  service 
)
Parameters
serviceCan be one of [prod, demo, dev]
Returns
URL of this service

◆ is_identity_registered()

bool is_identity_registered (   self,
UUID  uuid 
)

Check if this identity is registered with the backend.

Parameters
uuidThe UUID of the identity to check
Returns
True If the identity exists

◆ register_identity()

Response register_identity (   self,
bytes  key_registration 
)

Register an identity with the backend.

Parameters
key_registrationThe key registration data
Returns
The response from the server

◆ send()

Response send (   self,
UUID  uuid,
bytes  data 
)

Send data to the ubirch authentication service (Niomon).

Requires encoding before sending.

Parameters
uuidThe sender's UUID
dataThe msgpack or JSON encoded data to send
Returns
The response from the server

◆ send_data()

Response send_data (   self,
UUID  uuid,
bytes  data 
)

Send data to the ubirch data service.

Requires encoding before sending.

Parameters
uuidThe sender's UUID
dataThe msgpack or JSON encoded data to send
Returns
The response from the server

◆ set_authentication()

def set_authentication (   self,
UUID  uuid,
str or None  auth 
)
Parameters
uuidThe UUID of the authentication to add
authThe auth key / password of the ubirch 'thing'

◆ trust_identity_json()

Response trust_identity_json (   self,
dict  signed_trust 
)

Trust a new identity.

Parameters
signed_trustDictionary containing the identity details
Returns
The response from the server

◆ verify()

Response verify (   self,
bytes  data,
  quick = False 
)

Verify a given hash with the ubirch backend.

Returns all available verification data.

Parameters
dataThe hash of the message to verify
quickOnly run quick check to verify that the hash has been stored in backend
Returns
If the verification was successful and the data related to it

The documentation for this class was generated from the following file: