Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Well known (#145)
Browse files Browse the repository at this point in the history
* add _config for well-known

* fix fail build

* reorg well-known

---------

Co-authored-by: bnonni <bryan@nonni.io>
  • Loading branch information
bryan and bnonni authored Oct 11, 2024
1 parent 8b8c0f1 commit b07bc95
Show file tree
Hide file tree
Showing 17 changed files with 106 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://dcxprotocol.com/.well-known/manifest/email-address.json"
"https://dcxprotocol.com/.well-known/manifest/email"
],
"id": "https://dcxprotocol.com/.well-known/credential/EmailAddressCredential.json",
"id": "https://dcxprotocol.com/.well-known/credential/EmailCredential",
"type": [
"VerifiableCredential",
"EmailAddressCredential"
"EmailCredential"
],
"issuer": {
"id": "",
"name": "",
"description": ""
},
"name": "Email Address Credentaial",
"description": "The issuer of this this Email Address Credentaial attests that the holder has verified ownership of the enclosed email address via otp mfa",
"name": "Email Credentaial",
"description": "The issuer of this this Email Credentaial attests that the holder has verified ownership of the enclosed email address via otp mfa",
"validFrom": {
"type": "string",
"pattern": "^[0-9]{10,13}$"
Expand All @@ -28,13 +28,13 @@
"type": "string",
"pattern": "^did:dht:[a-z0-9]{52}$"
},
"emailAddress": {
"email": {
"type": "string",
"pattern": "^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$"
}
},
"credentialSchema": {
"type": "JsonSchema",
"id": "https://dcxprotocol.com/.well-known/credential/EmailAddressCredential.json"
"id": "https://dcxprotocol.com/.well-known/credential/EmailCredential"
}
}
40 changes: 40 additions & 0 deletions .well-known/credential/HandshakeCredential
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://dcxprotocol.com/.well-known/manifest/email"
],
"id": "https://dcxprotocol.com/.well-known/credential/HandshakeCredentaial",
"type": [
"VerifiableCredential",
"HandshakeCredentaial"
],
"issuer": {
"id": "",
"name": "",
"description": ""
},
"name": "Handshake Credentaial",
"description": "The issuer of this credentaial attests that the holder has completed an initial handshake with the issuer",
"validFrom": {
"type": "string",
"pattern": "^[0-9]{10,13}$"
},
"validUntil": {
"type": "string",
"pattern": "^did:dht:[a-z0-9]{52}$"
},
"credentialSubject": {
"id": {
"type": "string",
"pattern": "^did:dht:[a-z0-9]{52}$"
},
"timestamp": {
"type": "string",
"pattern": "^[0-9]{10,13}$"
}
},
"credentialSchema": {
"type": "JsonSchema",
"id": "https://dcxprotocol.com/.well-known/credential/HandshakeCredentaial"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"id": "https://dcxprotocol.com/.well-known/credential/PhoneNumberCredential.json",
"id": "https://dcxprotocol.com/.well-known/credential/PhoneCredential",
"type": [
"VerifiableCredential",
"PhoneNumberCredential"
"PhoneCredential"
],
"issuer": {
"id": "",
"name": "",
"description": ""
},
"name": "Phone Number Credentaial",
"description": "The issuer of this this Phone Number Credentaial attests that the holder has verified ownership of the enclosed phone number via otp mfa",
"name": "Phone Credentaial",
"description": "The issuer of this this Phone Credentaial attests that the holder has verified ownership of the enclosed phone number via otp mfa",
"validFrom": {
"type": "string",
"pattern": "^[0-9]{10,13}$"
Expand All @@ -28,13 +28,13 @@
"type": "string",
"pattern": "^did:dht:[a-z0-9]{52}$"
},
"phoneNumber": {
"phone": {
"type": "string",
"pattern": "^[0-9]{10}$"
},
"credentialSchema": {
"type": "JsonSchema",
"id": "https://dcxprotocol.com/.well-known/credential/PhoneNumberCredential.json"
"id": "https://dcxprotocol.com/.well-known/credential/PhoneCredential"
}
}
}
24 changes: 24 additions & 0 deletions .well-known/did
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"@context": [
"https://www.w3.org/ns/did/v1"
],
"id": "did:web:dcxprotocol.com",
"service": [
{
"id": "did:web:dcxprotocol.com",
"type": "DecentralizedWebNode",
"serviceEndpoint": [
"https://dwn.dpm.software/"
],
"enc": "#enc",
"sig": "#sig"
},
{
"id": "did:web:dcxprotocol.com",
"type": "DecentralizedPackageManagerRegistry",
"serviceEndpoint": [
"https://registry.dpm.software/"
]
}
]
}
6 changes: 0 additions & 6 deletions .well-known/did.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{
"id": "email-address-credential",
"name": "Email Address Credential",
"schema": "https://dcxprotocol.com/.well-known/credential/EmailAddressCredential.json"
"schema": "https://dcxprotocol.com/.well-known/credential/EmailCredential"
}
],
"format": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"id": "dcx-handshake-output",
"name": "DCX Handshake Credential",
"schema": "https://dcxprotocol.com/.well-known/credential/DcxHandshakeCredential.json"
"schema": "https://dcxprotocol.com/.well-known/credential/HandshakeCredential"
}
],
"format": {
Expand All @@ -38,25 +38,16 @@
}
},
"presentation_definition": {
"id": "dcx-handshake-presentation",
"id": "handshake-presentation",
"input_descriptors": [
{
"id": "dcx-handshake-input",
"purpose": "DCX Applicant initiates handshake with challenge 'Hello-DCX-<random_uuid>' in plain text and a signed challenge which is a signature on that plain text challenge.",
"id": "handshake-input",
"purpose": "",
"constraints": {
"fields": [
{
"path": [
"$.credentialSubject.challenge"
],
"filter": {
"type": "string",
"pattern": "^Hello-DCX-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
}
},
{
"path": [
"$.credentialSubject.signedChallenge"
"$.credentialSubject.timestamp"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{
"id": "phone-number-credential",
"name": "Phone Number Credential",
"schema": "https://dcxprotocol.com/.well-known/credential/PhoneNumberCredential.json"
"schema": "https://dcxprotocol.com/.well-known/credential/PhoneNumberCredential"
}
],
"format": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"protocol": "https://dcxprotocol.com/.well-known/protocol/dcx.json",
"protocol": "https://dcxprotocol.com/.well-known/protocol/dcx",
"published": true,
"types": {
"application": {
"schema": "https://dcxprotocol.com/.well-known/schema/application.json",
"schema": "https://dcxprotocol.com/.well-known/schema/application",
"dataFormats": [
"application/json"
]
},
"manifest": {
"schema": "https://dcxprotocol.com/.well-known/schema/dcx-manifest.json",
"schema": "https://dcxprotocol.com/.well-known/schema/manifest",
"dataFormats": [
"application/json"
]
},
"response": {
"schema": "https://dcxprotocol.com/.well-known/schema/dcx-response.json",
"schema": "https://dcxprotocol.com/.well-known/schema/response",
"dataFormats": [
"application/json"
]
},
"invoice": {
"schema": "https://dcxprotocol.com/.well-known/schema/invoice.json",
"schema": "https://dcxprotocol.com/.well-known/schema/invoice",
"dataFormats": [
"application/json"
]
Expand Down
10 changes: 5 additions & 5 deletions .well-known/protocol/exchange.json → .well-known/protocol/dcx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"protocol": "https://dcxprotocol.com/.well-known/protocol/dcx.json",
"protocol": "https://dcxprotocol.com/.well-known/protocol/dcx",
"published": true,
"types": {
"application": {
"schema": "https://dcxprotocol.com/.well-known/schema/application.json",
"schema": "https://dcxprotocol.com/.well-known/schema/application",
"dataFormats": [
"application/json"
]
},
"manifest": {
"schema": "https://dcxprotocol.com/.well-known/schema/dcx-manifest.json",
"schema": "https://dcxprotocol.com/.well-known/schema/manifest",
"dataFormats": [
"application/json"
]
},
"response": {
"schema": "https://dcxprotocol.com/.well-known/schema/dcx-response.json",
"schema": "https://dcxprotocol.com/.well-known/schema/response",
"dataFormats": [
"application/json"
]
},
"invoice": {
"schema": "https://dcxprotocol.com/.well-known/schema/invoice.json",
"schema": "https://dcxprotocol.com/.well-known/schema/invoice",
"dataFormats": [
"application/json"
]
Expand Down
10 changes: 5 additions & 5 deletions .well-known/protocol/issuer.json → .well-known/protocol/issuer
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"protocol": "https://dcxprotocol.com/.well-known/protocol/dcx-issuer.json",
"protocol": "https://dcxprotocol.com/.well-known/protocol/issuer",
"published": true,
"types": {
"application": {
"schema": "https://dcxprotocol.com/.well-known/schema/application.json",
"schema": "https://dcxprotocol.com/.well-known/schema/application",
"dataFormats": [
"application/json"
]
},
"manifest": {
"schema": "https://dcxprotocol.com/.well-known/schema/dcx-manifest.json",
"schema": "https://dcxprotocol.com/.well-known/schema/manifest",
"dataFormats": [
"application/json"
]
},
"response": {
"schema": "https://dcxprotocol.com/.well-known/schema/dcx-response.json",
"schema": "https://dcxprotocol.com/.well-known/schema/response",
"dataFormats": [
"application/json"
]
},
"invoice": {
"schema": "https://dcxprotocol.com/.well-known/schema/invoice.json",
"schema": "https://dcxprotocol.com/.well-known/schema/invoice",
"dataFormats": [
"application/json"
]
Expand Down
4 changes: 2 additions & 2 deletions .well-known/protocol/mfa.json → .well-known/protocol/mfa
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"published": true,
"types": {
"mfa": {
"schema": "https://dcxprotocol.com/.well-known/schema/mfa.json",
"schema": "https://dcxprotocol.com/.well-known/schema/mfa",
"dataFormats": [
"application/json"
]
Expand Down Expand Up @@ -53,7 +53,7 @@
]
}
]
},
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$id": "https://dcxprotocol.com/.well-known/schema/application",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://dcxprotocol.com/.well-known/schema/application.json",
"title": "Credential Application DWN Record Schema",
"description": "DWN record schema used to store information about a credential application",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$id": "https://dcxprotocol.com/.well-known/schema/invoice",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://dcxprotocol.com/.well-known/schema/invoice.json",
"title": "Credential Application DWN Record Schema",
"description": "DWN record schema used to store information about an invoice",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://dcxprotocol.com/.well-known/schema/manifest.json",
"$id": "https://dcxprotocol.com/.well-known/schema/manifest",
"title": "Credential Manifest DWN Record Schema",
"description": "DWN record schema used to store information about a credential manifest",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion .well-known/schema/mfa.json → .well-known/schema/mfa
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://dcxprotocol.com/.well-known/schema/mfa.json",
"$id": "https://dcxprotocol.com/.well-known/schema/mfa",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MFA DWN Record Schema",
"description": "DWN record schema used to store information about MFA for phone or email verification",
Expand Down
2 changes: 1 addition & 1 deletion .well-known/schema/response.json → .well-known/schema/response
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$id": "https://dcxprotocol.com/.well-known/schema/response",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://dcxprotocol.com/.well-known/schema/dcx-response.json",
"title": "Credential Response DWN Record Schema",
"description": "DWN record schema used to store information about a credential response",
"type": "object",
Expand Down

0 comments on commit b07bc95

Please sign in to comment.