peaq ID (Machine Identity)
peaq DID Specifications
Machines can locate one another, carry out transactions, verify assertions, preserve privacy, and uphold sovereignty thanks to the peaq DID standard. One of peaq’s DID fundamental value propositions is the standardization of machine interaction through a coalition of numerous industry leaders in a world of self-governing individuals - providing standardized interfaces for discovery that permit two participants to successfully engage in a transaction.
peaq DID Format
The method name peaq (in lowercase letters) and the following format must be used to identify the peaq DID method.
Status of the Information
The initial version of the peaq DID, which includes requirements for successful onboarding and commercial operations connected to automobiles and vehicle charging stations, is constantly evolving.
This is a foundational draft that will be enhanced in later iterations to accommodate a wider range of use cases in an effort to make this DID standard more all-encompassing and durable, while taking the lessons learned into account. In later editions of this text, references to charging stations will be used more widely to refer to machines.
peaq DID Document Example
In light of our use case for charging stations, the following are a few important lessons from the example given above.
- Metadata regarding the machine/charging station can be retrieved from the service object with id and type set to metadata. The returned metadata is encoded using Protobuf and bears the following structure.
The address listed under "serviceEndpoint" that corresponds to the service of type "payment" and id "#payment" can be used to ask the charging station to begin the charging process and to obtain the multi-sign wallet address.
There should be a p2p service available that enables others to talk to this thing via libp2p networking. All subsequent conversations will be conducted through the channels set up using this service.
peaq Pallet DID
The peaq DID standard enables machines to find one another, conduct transactions, validate assertions, protect privacy, and maintain sovereignty.
The peaq DID offers standardized interfaces for discovery that allow two participants to successfully engage in a transaction through a coalition of numerous industry experts in the area of self-governing individuals. This is one of our primary core values.
Import the pallet dependencies by adding below snippets to your runtime/src/Cargo.toml file
Implement peaq DID pallet on your runtime by adding below snippets to runtime/src/lib.rs file.
Add peaqDid parameter type to the runtime construct on your runtime/src/lib.rs file using below snippet.
For managing a DID, the current iteration of the DID pallet supports the following four extrinsics:
Add Attribute: Add the DID attribute that makes up the DID document.
- Allow any attribute to be added.
- No DID attribute validation.
Update Attribute: Update DID attribute already existing on the DID-document
- Return Not Found Error if it doesn't exist.
- Owner can only update their owned DID-documents.
- Read DID attribute if it exists on the DID-document else return error.
- Everyone can read DID-document.
- Delete DID attribute already existing on the DID-document.
- Dispatch error if it doesn't exist.
- Owner can only remove attributes they own.
The following sample schemas are based on active use cases being developed by peaq.
An Example of interacting with peaq DID Pallet