Skip to content
Snippets Groups Projects
Commit 433865e9 authored by Alexey Lunin's avatar Alexey Lunin
Browse files

op#242 apply prettier

parent c1d3db63
No related branches found
No related tags found
1 merge request!79refactor: separate service into smaller services OP#242
Showing
with 249 additions and 286 deletions
......@@ -9,5 +9,5 @@ export default {
moduleFileExtensions: ["ts", "js", "html"],
coverageDirectory: "../../coverage/apps/agent",
collectCoverage: true,
verbose: true
verbose: true,
};
......@@ -30,7 +30,8 @@ const ConnectionItem = observer(({ item, onClick }: ConnectionItemProps) => {
item.theirDid
) : (
<span className={s.warn}>
This connection is no longer active. Messages sent here will not be received.
This connection is no longer active. Messages sent here will not be
received.
</span>
)}
</div>
......
......@@ -35,7 +35,7 @@ const NewCredentialDefDialog = observer(
const credDef = await api.createCredentialDefinition({
schemaId,
tag,
supportRevocation: false
supportRevocation: false,
});
console.log(credDef);
toast.success(`New credential definition created`);
......
......@@ -11,7 +11,7 @@ export interface CustomFormProps {
onSignJsonLd: (doc: unknown) => void;
}
const selectOptions = examples.map(p => ({
const selectOptions = examples.map((p) => ({
value: p.name,
label: p.name,
}));
......
import React from "react";
import { Button, Space} from "antd";
import { Button, Space } from "antd";
import { FormType } from "../interfaces";
export interface IntroProps {
......
const examples = [
{
"name": "Vereign - PrivatePerson",
"doc": {
name: "Vereign - PrivatePerson",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://www.vereign.com/.well-known/vereign-schema"
"https://www.vereign.com/.well-known/vereign-schema",
],
"id": "",
"issuer": "",
"issuanceDate": "",
"type": [
"VerifiableCredential"
],
"credentialSubject": {
"type": "vereign:PrivatePerson",
id: "",
issuer: "",
issuanceDate: "",
type: ["VerifiableCredential"],
credentialSubject: {
type: "vereign:PrivatePerson",
"vereign:name": "Evelyn Parker",
"vereign:dateOfBirth": "12.06.1990",
"vereign:address": {
"vereign:street": "154 Maple Street, Apartment 3B",
"vereign:building": "154",
"vereign:city": "Sofia",
"vereign:country": "Bulgaria"
}
}
}
"vereign:country": "Bulgaria",
},
},
},
},
{
"name": "Vereign - LegalParticipant",
"doc": {
name: "Vereign - LegalParticipant",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://www.vereign.com/.well-known/vereign-schema"
"https://www.vereign.com/.well-known/vereign-schema",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
"type": "vereign:LegalParticipant",
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
type: "vereign:LegalParticipant",
"vereign:companyName": "SolarTech Dynamics Inc.",
"vereign:taxID": "123-456-7890",
"vereign:gleiCode": "5500Z99QKFTV873N4X35",
......@@ -49,144 +45,143 @@ const examples = [
"vereign:street": "Innovation Boulevard",
"vereign:building": "No. 202",
"vereign:city": "New Eden",
"vereign:country": "Atlantis"
}
}
}
"vereign:country": "Atlantis",
},
},
},
},
{
"name": "XFSC - participant",
"doc": {
name: "XFSC - participant",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
],
"type": [
"VerifiableCredential"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
"type": "gx:LegalParticipant",
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
type: "gx:LegalParticipant",
"gx:legalName": "Gaia-X European Association for Data and Cloud AISBL",
"gx:legalRegistrationNumber": {
"id": "https://gaia-x.eu/legalRegistrationNumberVC.json"
id: "https://gaia-x.eu/legalRegistrationNumberVC.json",
},
"gx:headquarterAddress": {
"gx:countrySubdivisionCode": "BE-BRU"
"gx:countrySubdivisionCode": "BE-BRU",
},
"gx:legalAddress": {
"gx:countrySubdivisionCode": "BE-BRU"
"gx:countrySubdivisionCode": "BE-BRU",
},
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - service",
"doc": {
name: "XFSC - service",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": ["VerifiableCredential"],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
"type": "gx:ServiceOffering",
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
type: "gx:ServiceOffering",
"gx:providedBy": {
"id": "https://wizard.lab.gaia-x.eu/api/credentials/2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8DFPWTYo5iRYkn8kvgU3AjMXc2qTbhuMHCpucKGgT1ZMkcHUygZkt11iD3T8VJNKYwsdk4MGoZwdqoFUuTKVcsXVTBA4ofD1Dtqzjavyng5WUpvJf4gRyfGkMvYYuHCgay8TK8Dayt6Rhcs3r2d1gRCg2UV419S9CpWZGwKQNEXdYbaB2eTiNbQ83KMd4mj1oSJgF7LLDZLJtKJbhwLzR3x35QUqEGevRxnRDKoPdHrEZN7r9TVAmvr9rt7Xq8eB4zGMTza59hisEAUaHsmWQNaVDorqFyZgN5bXswMK1irVQ5SVR9osCCRrKUKkntxfakjmSqapPfveMP39vkgTXfEhsfLUZXGwFcpgLpWxWRn1QLnJY11BVymS7DyaSvbSKotNFQxyV6vghfM2Jetw1mLxU5qsQqDYnDYJjPZQSmkwxjX3yenPVCz6N2ox83tj9AuuQrzg5p2iukNdunDd2QCsHaMEtTq9JVLzXtWs2eZbPkxCBEQwoKTGGVhKu5yxZjCtQGc#9894e9b0a38aa105b50bb9f4e7d0975641273416e70f166f4bd9fd1b00dfe81d"
id: "https://wizard.lab.gaia-x.eu/api/credentials/2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8DFPWTYo5iRYkn8kvgU3AjMXc2qTbhuMHCpucKGgT1ZMkcHUygZkt11iD3T8VJNKYwsdk4MGoZwdqoFUuTKVcsXVTBA4ofD1Dtqzjavyng5WUpvJf4gRyfGkMvYYuHCgay8TK8Dayt6Rhcs3r2d1gRCg2UV419S9CpWZGwKQNEXdYbaB2eTiNbQ83KMd4mj1oSJgF7LLDZLJtKJbhwLzR3x35QUqEGevRxnRDKoPdHrEZN7r9TVAmvr9rt7Xq8eB4zGMTza59hisEAUaHsmWQNaVDorqFyZgN5bXswMK1irVQ5SVR9osCCRrKUKkntxfakjmSqapPfveMP39vkgTXfEhsfLUZXGwFcpgLpWxWRn1QLnJY11BVymS7DyaSvbSKotNFQxyV6vghfM2Jetw1mLxU5qsQqDYnDYJjPZQSmkwxjX3yenPVCz6N2ox83tj9AuuQrzg5p2iukNdunDd2QCsHaMEtTq9JVLzXtWs2eZbPkxCBEQwoKTGGVhKu5yxZjCtQGc#9894e9b0a38aa105b50bb9f4e7d0975641273416e70f166f4bd9fd1b00dfe81d",
},
"gx:policy": "",
"gx:termsAndConditions": {
"gx:URL": "http://termsandconds.com",
"gx:hash": "d8402a23de560f5ab34b22d1a142feb9e13b3143"
"gx:hash": "d8402a23de560f5ab34b22d1a142feb9e13b3143",
},
"gx:dataAccountExport": {
"gx:requestType": "API",
"gx:accessType": "digital",
"gx:formatType": "application/json"
"gx:formatType": "application/json",
},
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - serviceLabelLevel1",
"doc": {
"credentialSubject": {
"id": ""
name: "XFSC - serviceLabelLevel1",
doc: {
credentialSubject: {
id: "",
},
"id": "",
"issuanceDate": "",
"issuer": ""
}
id: "",
issuanceDate: "",
issuer: "",
},
},
{
"name": "XFSC - termsAndConditions",
"doc": {
name: "XFSC - termsAndConditions",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": ["VerifiableCredential"],
"issuanceDate": "",
"credentialSubject": {
"@context": "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
"type": "gx:GaiaXTermsAndConditions",
"gx:termsAndConditions": "The PARTICIPANT signing the Self-Description agrees as follows:\n- to update its descriptions about any changes, be it technical, organizational, or legal - especially but not limited to contractual in regards to the indicated attributes present in the descriptions.\n\nThe keypair used to sign Verifiable Credentials will be revoked where Gaia-X Association becomes aware of any inaccurate statements in regards to the claims which result in a non-compliance with the Trust Framework and policy rules defined in the Policy Rules and Labelling Document (PRLD).",
"id": ""
type: ["VerifiableCredential"],
issuanceDate: "",
credentialSubject: {
"@context":
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
type: "gx:GaiaXTermsAndConditions",
"gx:termsAndConditions":
"The PARTICIPANT signing the Self-Description agrees as follows:\n- to update its descriptions about any changes, be it technical, organizational, or legal - especially but not limited to contractual in regards to the indicated attributes present in the descriptions.\n\nThe keypair used to sign Verifiable Credentials will be revoked where Gaia-X Association becomes aware of any inaccurate statements in regards to the claims which result in a non-compliance with the Trust Framework and policy rules defined in the Policy Rules and Labelling Document (PRLD).",
id: "",
},
"issuer": "",
"id": ""
}
issuer: "",
id: "",
},
},
{
"name": "XFSC - serviceWithResources",
"doc": {
name: "XFSC - serviceWithResources",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": [
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: [
{
"@type": "gx:ServiceOffering",
"@id": "https://lab.gaia-x.eu/lab.json",
"gx:providedBy": {
"@id": "did:web:wizard.lab.gaia-x.eu:development:api:credentials:2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8DQsEb24sbSenY4QHNVyrwjRTCZtrPHzTxGiHVtFohMXnmyScNcZHwcGDpEARdWXMVaVfmbfCfcmypHbC7Pxa8zzEtVtJyemWZyvsU66ndiqrg5b7a4VWUyvG8kh5ckH385QyL5i9vWL6w4rEM3rD56ZFzjKrRrZ8wz2nEQFfTFcFKD3mZdZrfnLntaQz6y7daWs9xX2dJ5d65EewDskcoXHuC3QqBJru45sHMjDBv5AAVopWg6sPdNPDdVPhk8ToPVtUzWnSEfqirHzzgrrGFvXuJ2PFV1h5RFWDvP6yFxn6dtcCdYVbqt45c8BH6zR7YrxZqhLNV7j9voKE6HdYMgz7NyeQ3mCYENAF2qtf6gHHx41Bu7ApSbQcNFCoEapFQaowg1rsU3L3oUxC51zT47wPoNU4sG71uKrLyuz56sH3fmx4wGCCPZsuqQNXH3brnubcYfdG39Rg2A89yawAN1g42kUMiuMcgL5Cu5L2TZtq9XhSRsV6gwYPW5g2FLoFSyNhxp#7eb7b2675ecb358920f8fba55e2445f547ea2a251d8eee50c9fb2a60bf6a7441"
"@id":
"did:web:wizard.lab.gaia-x.eu:development:api:credentials:2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8DQsEb24sbSenY4QHNVyrwjRTCZtrPHzTxGiHVtFohMXnmyScNcZHwcGDpEARdWXMVaVfmbfCfcmypHbC7Pxa8zzEtVtJyemWZyvsU66ndiqrg5b7a4VWUyvG8kh5ckH385QyL5i9vWL6w4rEM3rD56ZFzjKrRrZ8wz2nEQFfTFcFKD3mZdZrfnLntaQz6y7daWs9xX2dJ5d65EewDskcoXHuC3QqBJru45sHMjDBv5AAVopWg6sPdNPDdVPhk8ToPVtUzWnSEfqirHzzgrrGFvXuJ2PFV1h5RFWDvP6yFxn6dtcCdYVbqt45c8BH6zR7YrxZqhLNV7j9voKE6HdYMgz7NyeQ3mCYENAF2qtf6gHHx41Bu7ApSbQcNFCoEapFQaowg1rsU3L3oUxC51zT47wPoNU4sG71uKrLyuz56sH3fmx4wGCCPZsuqQNXH3brnubcYfdG39Rg2A89yawAN1g42kUMiuMcgL5Cu5L2TZtq9XhSRsV6gwYPW5g2FLoFSyNhxp#7eb7b2675ecb358920f8fba55e2445f547ea2a251d8eee50c9fb2a60bf6a7441",
},
"gx:termsAndConditions": {
"@id": "https://lab.gaia-x.eu/soterms.json",
"@type": "gx:SOTermsAndConditions",
"gx:URL": "",
"gx:hash": ""
"gx:hash": "",
},
"gx:policy": "",
"gx:dataAccountExport": {
"gx:requestType": "API",
"gx:accessType": "digital",
"gx:formatType": "application/json"
"gx:formatType": "application/json",
},
"gx:aggregationOf": [
{
"@id": "https://lab.gaia-x.eu/ces-software.json"
"@id": "https://lab.gaia-x.eu/ces-software.json",
},
{
"@id": "https://lab.gaia-x.eu/ovh-k8s.json"
}
]
"@id": "https://lab.gaia-x.eu/ovh-k8s.json",
},
],
},
{
"@id": "https://lab.gaia-x.eu/cesDataResource.json",
......@@ -198,43 +193,46 @@ const examples = [
"gx:license": "EPL-2.0",
"gx:copyrightOwnedBy": "original owner",
"gx:producedBy": {
"@id": "did:web:wizard.lab.gaia-x.eu:development:api:credentials:2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVS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9voKE6HdYMgz7NyeQ3mCYENAF2qtf6gHHx41Bu7ApSbQcNFCoEapFQaowg1rsU3L3oUxC51zT47wPoNU4sG71uKrLyuz56sH3fmx4wGCCPZsuqQNXH3brnubcYfdG39Rg2A89yawAN1g42kUMiuMcgL5Cu5L2TZtq9XhSRsV6gwYPW5g2FLoFSyNhxp#7eb7b2675ecb358920f8fba55e2445f547ea2a251d8eee50c9fb2a60bf6a7441",
},
"gx:exposedThrough": {
"@id": "https://lab.gaia-x.eu/lab.json"
}
"@id": "https://lab.gaia-x.eu/lab.json",
},
},
{
"@type": "gx:SoftwareResource",
"@id": "https://lab.gaia-x.eu/ces-software.json",
"gx:policy": "default: allow",
"gx:license": "EPL-2.0",
"gx:copyrightOwnedBy": "original owner"
"gx:copyrightOwnedBy": "original owner",
},
{
"@type": "gx:SoftwareResource",
"@id": "https://lab.gaia-x.eu/ovh-k8s.json",
"gx:policy": "default: allow",
"gx:license": "https://www.ovh.com/fr/support/documents_legaux/conditions%20generales%20de%20service.pdf",
"gx:copyrightOwnedBy": "OVH"
"gx:license":
"https://www.ovh.com/fr/support/documents_legaux/conditions%20generales%20de%20service.pdf",
"gx:copyrightOwnedBy": "OVH",
},
{
"@type": "gx:InstantiatedVirtualResource",
"@id": "https://lab.gaia-x.eu/cesDevInstance.json",
"gx:instanceOf": {
"@id": "https://lab.gaia-x.eu/ces-software.json"
"@id": "https://lab.gaia-x.eu/ces-software.json",
},
"gx:hostedOn": {
"@id": "https://lab.gaia-x.eu/ovh-k8s.json"
"@id": "https://lab.gaia-x.eu/ovh-k8s.json",
},
"gx:maintainedBy": {
"@id": "did:web:wizard.lab.gaia-x.eu:development:api:credentials:2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8DQsEb24sbSenY4QHNVyrwjRTCZtrPHzTxGiHVtFohMXnmyScNcZHwcGDpEARdWXMVaVfmbfCfcm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fdG39Rg2A89yawAN1g42kUMiuMcgL5Cu5L2TZtq9XhSRsV6gwYPW5g2FLoFSyNhxp#7eb7b2675ecb358920f8fba55e2445f547ea2a251d8eee50c9fb2a60bf6a7441",
},
"gx:serviceAccessPoint": [
{
"@id": "https://lab.gaia-x.eu/cesDevInstanceAP.json"
}
]
"@id": "https://lab.gaia-x.eu/cesDevInstanceAP.json",
},
],
},
{
"@type": "gx:ServiceAccessPoint",
......@@ -243,55 +241,51 @@ const examples = [
"gx:port": "443",
"gx:protocol": "https",
"gx:version": "1.0.0",
"gx:openAPI": "https://ces-development.lab.gaia-x.eu/q/swagger-ui"
"gx:openAPI": "https://ces-development.lab.gaia-x.eu/q/swagger-ui",
},
{
"@type": "gx:LegitimateInterest",
"@id": "https://lab.gaia-x.eu/ces-interest.json",
"gx:legalBasis": "GDPR-6-1-a",
"gx:dataProtectionContact": "https://gaia-x.eu/privacy-policy/"
}
]
}
"gx:dataProtectionContact": "https://gaia-x.eu/privacy-policy/",
},
],
},
},
{
"name": "XFSC - sOTermsAndConditions",
"doc": {
name: "XFSC - sOTermsAndConditions",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
],
"type": [
"VerifiableCredential"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@id": "https://lab.gaia-x.eu/soterms.json",
"@type": "gx:SOTermsAndConditions",
"gx:URL": "",
"gx:hash": "",
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - dataResource",
"doc": {
name: "XFSC - dataResource",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
],
"type": [
"VerifiableCredential"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@id": "https://lab.gaia-x.eu/cesDataResource.json",
"@type": "gx:DataResource",
"gx:name": "CES Data",
......@@ -301,30 +295,28 @@ const examples = [
"gx:license": "EPL-2.0",
"gx:copyrightOwnedBy": "original owner",
"gx:producedBy": {
"@id": "__id of the data provider participant CS__"
"@id": "__id of the data provider participant CS__",
},
"gx:exposedThrough": {
"@id": "__id of the service offering exposing this data__"
"@id": "__id of the service offering exposing this data__",
},
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - physicalResource",
"doc": {
name: "XFSC - physicalResource",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@type": "gx:PhysicalResource",
"@id": "https://lab.gaia-x.eu/ces-physical.json",
"gx:policy": "default: allow",
......@@ -336,99 +328,91 @@ const examples = [
"@type": "vcard:Address",
"vcard:postal-code": "12345",
"vcard:street-address": "123 Main St",
"gx:countryCode": "US"
"gx:countryCode": "US",
},
"gx:location": "35.89421911 139.94637467",
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - softwareResource",
"doc": {
name: "XFSC - softwareResource",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@type": "gx:SoftwareResource",
"@id": "https://lab.gaia-x.eu/ces-software.json",
"gx:policy": "default: allow",
"gx:license": "EPL-2.0",
"gx:copyrightOwnedBy": "original owner",
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - virtualResource",
"doc": {
name: "XFSC - virtualResource",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@type": "gx:VirtualResource",
"@id": "https://lab.gaia-x.eu/ces-software.json",
"gx:policy": "default: allow",
"gx:license": "EPL-2.0",
"gx:copyrightOwnedBy": "original owner",
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - legitimateInterest",
"doc": {
name: "XFSC - legitimateInterest",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@type": "gx:LegitimateInterest",
"@id": "https://lab.gaia-x.eu/ces-interest.json",
"gx:legalBasis": "GDPR-6-1-a",
"gx:dataProtectionContact": "https://gaia-x.eu/privacy-policy/",
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - serviceAccessPoint",
"doc": {
name: "XFSC - serviceAccessPoint",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@type": "gx:ServiceAccessPoint",
"@id": "https://lab.gaia-x.eu/cesDevInstanceAP.json",
"gx:host": "ces-development.lab.gaia-x.eu",
......@@ -436,45 +420,44 @@ const examples = [
"gx:protocol": "https",
"gx:version": "1.0.0",
"gx:openAPI": "https://ces-development.lab.gaia-x.eu/q/swagger-ui",
"id": ""
}
}
id: "",
},
},
},
{
"name": "XFSC - instantiatedVirtualResource",
"doc": {
name: "XFSC - instantiatedVirtualResource",
doc: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#",
],
"type": [
"VerifiableCredential"
],
"id": "",
"issuer": "",
"issuanceDate": "",
"credentialSubject": {
type: ["VerifiableCredential"],
id: "",
issuer: "",
issuanceDate: "",
credentialSubject: {
"@type": "gx:InstantiatedVirtualResource",
"@id": "https://lab.gaia-x.eu/cesDevInstance.json",
"gx:instanceOf": {
"@id": "__id of the cs of software resource this is an instance of__"
"@id": "__id of the cs of software resource this is an instance of__",
},
"gx:hostedOn": {
"@id": "__id of the cs of the physical or virtual resource hosting this__"
"@id":
"__id of the cs of the physical or virtual resource hosting this__",
},
"gx:maintainedBy": {
"@id": "__id of the cs of the participant maintaining this__"
"@id": "__id of the cs of the participant maintaining this__",
},
"gx:serviceAccessPoint": [
{
"@id": "__id of the cs of the service access point__"
}
"@id": "__id of the cs of the service access point__",
},
],
"id": ""
}
}
}
]
id: "",
},
},
},
];
export default examples;
......@@ -34,7 +34,7 @@ class LoginPageStore {
requiredCredDef = await api.createCredentialDefinition({
schemaId: this.schemaId,
tag: "Identity",
supportRevocation: false
supportRevocation: false,
});
}
......
......@@ -34,7 +34,7 @@ class RegisterPageStore {
requiredCredDef = await api.createCredentialDefinition({
schemaId: this.schemaId,
tag: "Identity",
supportRevocation: false
supportRevocation: false,
});
}
......
......@@ -32,7 +32,7 @@ import {
WalletKeyExistsError,
WebDidResolver,
JwkDidResolver,
TrustPingResponseReceivedEvent, DidRecord,
DidRecord,
} from "@credo-ts/core";
import {
AnonCredsCredentialFormatService,
......@@ -47,7 +47,7 @@ import {
IndyVdrModule,
} from "@credo-ts/indy-vdr";
import { indyVdr } from "@hyperledger/indy-vdr-nodejs";
import { anoncreds } from '@hyperledger/anoncreds-nodejs'
import { anoncreds } from "@hyperledger/anoncreds-nodejs";
import { AskarModule } from "@credo-ts/askar";
import { ariesAskar } from "@hyperledger/aries-askar-nodejs";
import { Key as AskarKey, KeyAlgs } from "@hyperledger/aries-askar-shared";
......@@ -75,7 +75,7 @@ export type SubjectMessage = {
import { Request, Response, Express } from "express";
import url from "url";
import { JsonLdCredentialFormatService } from "./credo/JsonLdCredentialFormatService";
import {EntityNotFoundError} from "@ocm-engine/dtos";
import { EntityNotFoundError } from "@ocm-engine/dtos";
export const importDidsToWallet = async (
agent: Agent,
......@@ -638,7 +638,9 @@ export const webHookHandler = async <T>(
}
};
export const getFirstDidWebRecord = async (agent: Agent): Promise<DidRecord> => {
export const getFirstDidWebRecord = async (
agent: Agent,
): Promise<DidRecord> => {
const didWebs = await agent.dids.getCreatedDids({
method: "web",
});
......
......@@ -118,7 +118,9 @@ export class EventHandlerService {
case CRED_DEF_GET:
dto = event.data as IdReqDto;
data = await this.agentAnoncredsService.getCredentialDefinitionById(dto.id);
data = await this.agentAnoncredsService.getCredentialDefinitionById(
dto.id,
);
break;
case CRED_SEND_OFFER:
......
......@@ -6,10 +6,7 @@ import {
HttpStatus,
BadRequestException,
} from "@nestjs/common";
import {
CredoError,
RecordNotFoundError,
} from "@credo-ts/core";
import { CredoError, RecordNotFoundError } from "@credo-ts/core";
import { EntityNotFoundError } from "@ocm-engine/dtos";
@Catch()
......
......@@ -154,7 +154,10 @@ export class RestController {
@Post("/credentials/jsonld/offers")
async offerJsonLdCredential(@Body() data: OfferJsonCredentialRequests) {
return this.agentJsonldService.offerJsonLdCredential(data.connectionId, data.doc);
return this.agentJsonldService.offerJsonLdCredential(
data.connectionId,
data.doc,
);
}
@Post("/jsonld/sign")
......@@ -181,7 +184,9 @@ export class RestController {
@Get("/credentials/:id/format-data")
async getCredentialFormatDataById(@Param("id") credentialId: string) {
return this.agentCredentialsService.getCredentialFormatDataById(credentialId);
return this.agentCredentialsService.getCredentialFormatDataById(
credentialId,
);
}
@Post("/credentials/offers/accept")
......
......@@ -88,7 +88,7 @@ export class AgentConnectionsService {
deleteConnectionById = async (id: string): Promise<void> => {
await this.askar.agent.connections.hangup({
connectionId: id,
deleteAfterHangup: true
deleteAfterHangup: true,
});
};
......
......@@ -15,9 +15,7 @@ import {
CredentialState,
Query,
} from "@credo-ts/core";
import {
waitForCredentialExchangeRecordSubject,
} from "../agent.utils";
import { waitForCredentialExchangeRecordSubject } from "../agent.utils";
@Injectable()
export class AgentCredentialsService {
......@@ -112,7 +110,6 @@ export class AgentCredentialsService {
return this.acceptConnectionCredential(acceptCredentialDto.credentialId);
};
acceptOobCredentials = async (url: string): Promise<CredentialRecordDto> => {
// omit await in order to catch received record in the next line
setTimeout(() => {
......@@ -254,7 +251,6 @@ export class AgentCredentialsService {
getCredentialFormatDataById = async (
credentialId: string,
): Promise<CredentialFormatDataDto> => {
const formatData = await this.askar.agent.credentials.getFormatData(
credentialId,
);
......
import { Injectable, Logger } from "@nestjs/common";
import { AskarService } from "./askar.service";
import {
DidRecordDto,
} from "@ocm-engine/dtos";
import { DidRecordDto } from "@ocm-engine/dtos";
@Injectable()
export class AgentDidsService {
......@@ -27,5 +25,4 @@ export class AgentDidsService {
return dto;
});
};
}
......@@ -19,9 +19,7 @@ import {
W3cJsonLdVerifiableCredential,
} from "@credo-ts/core";
import { uuid } from "@credo-ts/core/build/utils/uuid";
import {
getFirstDidWebRecord,
} from "../agent.utils";
import { getFirstDidWebRecord } from "../agent.utils";
@Injectable()
export class AgentJsonldService {
......@@ -259,5 +257,4 @@ export class AgentJsonldService {
credentialRecord: dto,
};
};
}
......@@ -7,10 +7,7 @@ import {
CreateInvitationRequestDto,
InvitationFilterDto,
} from "@ocm-engine/dtos";
import {
Query,
OutOfBandRecord,
} from "@credo-ts/core";
import { Query, OutOfBandRecord } from "@credo-ts/core";
@Injectable()
export class AgentOobService {
......@@ -49,7 +46,6 @@ export class AgentOobService {
return response;
};
acceptInvitation = async (
invitationUrl: string,
): Promise<ConnectionRecordDto> => {
......@@ -79,7 +75,6 @@ export class AgentOobService {
return this.askar.agent.oob.deleteById(id);
};
fetchInvitations = async (filter: InvitationFilterDto) => {
const query: Query<OutOfBandRecord>[] = [];
......@@ -138,5 +133,4 @@ export class AgentOobService {
response.state = invitation.state;
return response;
};
}
......@@ -9,17 +9,10 @@ import {
EntityNotFoundError,
ProofFormatDataDto,
} from "@ocm-engine/dtos";
import {
ProofState,
Query,
ProofExchangeRecord,
} from "@credo-ts/core";
import { ProofState, Query, ProofExchangeRecord } from "@credo-ts/core";
import { AnonCredsRequestedAttribute } from "@credo-ts/anoncreds";
import { uuid } from "@credo-ts/core/build/utils/uuid";
import {
waitForProofExchangeRecordSubject,
} from "../agent.utils";
import { waitForProofExchangeRecordSubject } from "../agent.utils";
@Injectable()
export class AgentProofsService {
......
......@@ -38,7 +38,7 @@ import { GatewayClient } from "@ocm-engine/clients";
AgentJsonldService,
AgentOobService,
AgentProofsService,
AskarService
AskarService,
],
})
export class AskarModule {}
......@@ -47,17 +47,13 @@ export class SubjectOutboundTransport implements OutboundTransport {
const { payload, endpoint } = outboundPackage;
if (!endpoint) {
throw new CredoError(
"Cannot send message to subject without endpoint",
);
throw new CredoError("Cannot send message to subject without endpoint");
}
const subject = this.subjectMap[endpoint];
if (!subject) {
throw new CredoError(
`No subject found for endpoint ${endpoint}`,
);
throw new CredoError(`No subject found for endpoint ${endpoint}`);
}
// Create a replySubject just for this session. Both ends will be able to close it,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment