Class Uri

Package: io.keychain.core

public class Uri
extends java.lang.Object

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.

For informational purposes only, the serialization as of v2.4 looks like one of the below.

  • <protocol>:<genesis block hash in hex>:<transaction hash>:<output index>

  • <protocol>:<transaction hash>:<output index>

  • <transaction hash>:<output index>

Public Constructors

Constructor

Uri(byte[] uriBytes)

Constructs a Uri from the byte array. The result of Uri#serialize() can be used as a parameter to this constructor.

Uri(String uriString)

Constructs a Uri from a String. The result of Uri#toString() can be used as a parameter to this constructor.

Public Member Functions

Return type Method and Description

byte[]

serialize()

Returns the Uri in a serialized byte array format

String

toString()

Returns the Uri in a serialized String format

Public Member Functions Detail

serialize

byte[] serialize()

The Uri serialized in a way that it can be used to construct a new Uri from a byte[]

Returns:

The serialized Uri

toString

String toString()

The Uri serialized in a human-readable String, which can be used to construct a new Uri

Returns:

The String-formatted serialized Uri