public:hyper_ai:home

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
public:hyper_ai:home [2025/02/24 11:35]
fjromero_odins.es
public:hyper_ai:home [2025/02/25 18:04] (current)
jsanchez_odins.es [Postman Collection for DID]
Line 14: Line 14:
 2. Email: 2. Email:
 3. Tasks involved/Partners involved: 3. Tasks involved/Partners involved:
-4. Broker Entities in particular involved: +4. Severity (select from Minor, Moderate, Major and Critical): 
-5. Severity (select from Minor, Moderate, Major and Critical): +5. Summary: 
-6. Summary: +6. Description: 
-7. Description: +7. Error messages obtained: 
-8. Error messages obtained: +8. Requests that produce the errors (so that we can reproduce the issue): 
-9. Requests that produce the errors (so that we can reproduce the issue): +9. Time interval (UTC time) during which these errors have occurred:
-10. Time interval (UTC time) during which these errors have occurred:+
  
 We will try to resolve your issue as soon as possible. Thank you very much and sorry for the inconvenience. We will try to resolve your issue as soon as possible. Thank you very much and sorry for the inconvenience.
Line 31: Line 30:
 DIDs enable authentication, digital signatures, and credential verification in a secure and decentralized manner. They are generally associated with public key cryptography to validate the authenticity of interactions and documents. DIDs enable authentication, digital signatures, and credential verification in a secure and decentralized manner. They are generally associated with public key cryptography to validate the authenticity of interactions and documents.
  
-{{:public:hyper_ai:20250224-112359.png}}+{{ :public:hyper_ai:20250224-112359.png?750 }}
  
-Taking the example shown in the image above.+Taking the example shown in the image above:
  
 The **@context** field defines the context in which the DID will be interpreted. In this case, it uses the W3C standard for DIDs: "https://www.w3.org/ns/did/v1". It ensures that the properties of the DID document are correctly interpreted. The **@context** field defines the context in which the DID will be interpreted. In this case, it uses the W3C standard for DIDs: "https://www.w3.org/ns/did/v1". It ensures that the properties of the DID document are correctly interpreted.
Line 79: Line 78:
 ## Use of DIDs ## Use of DIDs
  
-To register a DID on the Blockchain, a POST request must be sent to the Blockchain API. This request should include the DID to be registered in the ‘Did’ header and the corresponding DID Document in the request body. If the registration is successful, the API will respond with a ‘200 OK’ status.+To register a DID on the Blockchain, a POST request must be sent to the Blockchain API. This request should include the DID to be registered in the ‘Did’ header and the corresponding DID Document in the request body. If the registration is successful, the API will respond with a ‘200 OK’ status. However, the DIDs will be uniquely generated by the Holder of each node, ensuring that each identity remains decentralized and unique.
  
-{{ :public:hyper_ai:20250224-105153.png?200  }}+The following can be performed as a test.
  
-To retrieve a DID Document from the Blockchain, a GET request should be made to the Blockchain API, specifying the desired DID in the ‘Did’ header. If the DID is found in the Blockchain, the response will include a ‘200 OK’ status along with the DID Document in the response body. +#### Endpoint
- +
-{{ :public:hyper_ai:20250224-105244.png }} +
- +
-### Endpoints +
-Folder postman contains a JSON file that can be exported to POSTMAN to test all endpoints described below:+
  
-### 0CI/CD+##### 1.1 Register DID in Blockchain
  
-#### 0.1 Decentralized Identifiers 
-- **Endpoint**: /test/did 
- 
-- **Method**: GET 
- 
-- **Description**: Returns the name of the channel where the DID Smart Contract is deployed. Useful to check that the Smart Contract has been successfully deployed. 
- 
-{{ :public:hyper_ai:20250224-105805.png }} 
- 
-### 1. Decentralized Identifiers 
- 
-#### 1.1 Register DID in Blockchain 
 - **Endpoint**: /fabric/did/register - **Endpoint**: /fabric/did/register
  
Line 118: Line 100:
 - **Description**: Register a DID Document associated with a DID Id in Blockchain. - **Description**: Register a DID Document associated with a DID Id in Blockchain.
  
-#### 1.2 Get DID from Blockchain+{{:public:hyper_ai:20250224-105153.png?750}} 
 + 
 +To retrieve a DID Document from the Blockchain, a GET request should be made to the Blockchain API, specifying the desired DID in the ‘Did’ header. If the DID is found in the Blockchain, the response will include a ‘200 OK’ status along with the DID Document in the response body. 
 + 
 +#### Endpoint 
 + 
 +##### 1.2 Get DID from Blockchain 
 - **Endpoint**: /fabric/did/obtain - **Endpoint**: /fabric/did/obtain
  
Line 128: Line 117:
  
 - **Description**: Retrieve the DID Document associated with the DID id indicated in the 'did' header from Blockchain. - **Description**: Retrieve the DID Document associated with the DID id indicated in the 'did' header from Blockchain.
 +
 +{{:public:hyper_ai:20250224-105244.png?750}}
 +
 +### Test Endpoint
 +
 +- **Endpoint**: /test/did
 +
 +- **Method**: GET
 +
 +- **Description**: Returns the name of the channel where the DID Smart Contract is deployed. Useful to check that the Smart Contract has been successfully deployed.
 +
 +{{:public:hyper_ai:20250224-105805.png}}
 +
 +### Postman Collection for DID
 +
 +Please download the following code and open it using https://www.postman.com/
 +
 +
 +```json
 +{
 + "info": {
 + "_postman_id": "deab8a12-4a64-4d69-a78a-ecdb857f0b65",
 + "name": "DID requests",
 + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
 + "_exporter_id": "39592430"
 + },
 + "item": [
 + {
 + "name": "DID - Test",
 + "protocolProfileBehavior": {
 + "disableBodyPruning": true
 + },
 + "request": {
 + "method": "GET",
 + "header": [],
 + "body": {
 + "mode": "raw",
 + "raw": "",
 + "options": {
 + "raw": {
 + "language": "json"
 + }
 + }
 + },
 + "url": {
 + "raw": "https://heimdall.odins.es/test/did",
 + "protocol": "http",
 + "host": [
 + "localhost"
 + ],
 + "port": "3002",
 + "path": [
 + "test",
 + "did"
 + ]
 + }
 + },
 + "response": []
 + },
 + {
 + "name": "DID - Register",
 + "request": {
 + "method": "POST",
 + "header": [
 + {
 + "key": "Did",
 + "value": "did:fabric:z218q5McPufPy8NqCG29DRNq",
 + "type": "text"
 + }
 + ],
 + "body": {
 + "mode": "raw",
 + "raw": "{\n    \"@context\": \"https://www.w3.org/ns/did/v1\",\n    \"assertionMethod\": [\n        \"did:fabric:z218q5McPufPy8NqCG29DRNq#bee3b922c76946f9b14cf0c730c00e99\"\n    ],\n    \"authentication\": [\n        \"did:fabric:z218q5McPufPy8NqCG29DRNq#bee3b922c76946f9b14cf0c730c00e99\"\n    ],\n    \"id\": \"did:fabric:z218q5McPufPy8NqCG29DRNq\",\n    \"verificationMethod\": [\n        {\n            \"controller\": \"did:fabric:z218q5McPufPy8NqCG29DRNq\",\n            \"id\": \"did:fabric:z218q5McPufPy8NqCG29DRNq#bee3b922c76946f9b14cf0c730c00e99\",\n            \"publicKeyJwk\": {\n                \"alg\": \"ES256K\",\n                \"crv\": \"secp256k1\",\n                \"kid\": \"bee3b922c76946f9b14cf0c730c00e99\",\n                \"kty\": \"EC\",\n                \"use\": \"sig\",\n                \"x\": \"kg-qcoe5Sg8uqqCyzDDGOFa5XPx6jHAFN-U1Xo__NUE\",\n                \"y\": \"EZ-Jg8lQVERffibrQU45Keumxh912jrKIePVGK8GnDc\"\n            },\n            \"type\": \"EcdsaSecp256k1VerificationKey2019\"\n        }\n    ]\n}",
 + "options": {
 + "raw": {
 + "language": "json"
 + }
 + }
 + },
 + "url": {
 + "raw": "https://heimdall.odins.es/fabric/did/register",
 + "protocol": "https",
 + "host": [
 + "heimdall",
 + "odins",
 + "es"
 + ],
 + "path": [
 + "fabric",
 + "did",
 + "register"
 + ]
 + }
 + },
 + "response": []
 + },
 + {
 + "name": "DID - Obtain",
 + "protocolProfileBehavior": {
 + "disableBodyPruning": true
 + },
 + "request": {
 + "method": "GET",
 + "header": [
 + {
 + "key": "did",
 + "value": "did:fabric:z218q5McPufPy8NqCG29DRNq",
 + "type": "text"
 + }
 + ],
 + "body": {
 + "mode": "raw",
 + "raw": "",
 + "options": {
 + "raw": {
 + "language": "text"
 + }
 + }
 + },
 + "url": {
 + "raw": "https://heimdall.odins.es/fabric/did/obtain",
 + "protocol": "https",
 + "host": [
 + "heimdall",
 + "odins",
 + "es"
 + ],
 + "path": [
 + "fabric",
 + "did",
 + "obtain"
 + ]
 + }
 + },
 + "response": []
 + }
 + ]
 +}
 +```
  • public/hyper_ai/home.1740393320.txt.gz
  • Last modified: 2025/02/24 11:35
  • by fjromero_odins.es