Class uri

#include <keychain/cache/uri.hpp>

Namespace: keychain

Inheritance: uri

Description

uri is a location on a blockchain where the gateway can find certificates for pairing. Its serialization format may change over library versions, so regard this as an opaque object.

Since: v2.0

Public Constructors

Constructor

uri()

Constructs an empty uri

uri(std::string uri_string)

Constructs a uri using the serialized representation of it (in v2.4 this is the to_string() result)

uri(std::string encr_txid, size_t encr_vout, std::string sign_txid, size_t sign_vout)

Constructs a uri using individual components, namely the encryption and signing transaction IDs and indices in the blockchain transaction

Public Member Functions

Return type Method and Description

std::string

to_string()

Serializes the URI as a UTF-8 string

bool

is_null()

Whether the URI is a NULL sentinel object

Public Member Functions Detail

to_string

std::string to_string()

Serialize the uri into a string representation. In v2.4 this is a concatenation of the underlying transaction IDs and vout indices within the transaction holding the certificate on the blockchain. Please do not rely on this format and treat it as opaque.

Returns:

The serialized uri

is_null

bool is_null()

Whether the uri is actually a NULL pattern sentinel object. This is an object that is constructed but not intended for use. You come across it when a method needs to return "a" uri and can’t throw an exception or return null. Check for is_null before using a `uri.

Returns:

true if the uri is a NULL sentinel