Static
appendAppends a specified path to a base URL, ensuring proper formatting of the resulting URL.
This method is useful for constructing URLs for accessing various endpoints, such as Sidetree nodes in the ION network. It handles the nuances of URL path concatenation, including the addition or removal of leading/trailing slashes, to create a well-formed URL.
The parameters for URL construction.
The base URL to which the path will be appended.
The path to append to the base URL.
The fully constructed URL string with the path appended to the base URL.
Static
computeComputes the Long Form DID URI given an ION DID's recovery key, update key, services, and verification methods.
The parameters for computing the Long Form DID URI.
The ION Recovery Key.
An array of services associated with the DID.
The ION Update Key.
An array of verification methods associated with the DID.
A Promise resolving to the Long Form DID URI.
Static
constructConstructs a Sidetree Create Operation request for a DID document within the ION network.
This method prepares the necessary payload for submitting a Create Operation to a Sidetree node, encapsulating the details of the DID document, recovery key, and update key.
A promise resolving to the ION Create Operation request model, ready for submission to a Sidetree node.
Static
createAssembles an ION document model from provided services and verification methods
This model serves as the foundation for a DID document in the ION network, facilitating the creation and management of decentralized identities. It translates service endpoints and public keys into a format compatible with the Sidetree protocol, ensuring the resulting DID document adheres to the required specifications for ION DIDs. This method is essential for constructing the payload needed to register or update DIDs within the ION network.
The parameters containing the services and verification methods to include in the ION document.
A list of service endpoints to be included in the DID document, specifying ways to interact with the DID subject.
A list of verification methods to be included, detailing the cryptographic keys and their intended uses within the DID document.
A Promise resolving to an IonDocumentModel
, ready for use in Sidetree operations like DID creation and updates.
Private
Static
normalize
The
DidIonUtils
class provides utility functions to support operations in the DID ION method.