Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 178 additions & 0 deletions .env.demo

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions compass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: credo-controller
id: ari:cloud:compass:6095931c-8137-4ae1-822a-2d7411835fc7:component/9029b47a-062e-4e25-a761-a2c0fc9ebd98/b6016bde-79c2-4d3f-84cf-b25f27bc50c7
description: Controller App for Aries Framework JavaScript REST Extension
configVersion: 1
typeId: SERVICE
ownerId: ari:cloud:identity::team/6fe50e36-8efb-47a6-aab5-ea47bd10ec4e
fields:
tier: 4
links:
- name: null
type: REPOSITORY
url: https://github.com/credebl/credo-controller
relationships:
DEPENDS_ON: []
labels:
- aries
- aries-framework-javascript
- decentralized-identity
- language:typescript
- self-sovereign-identity
- source:github
customFields: null
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"validate": "yarn lint && yarn check-types && yarn check-format"
},
"dependencies": {
"@ayanworks/credo-polygon-w3c-module": "1.0.0",
"@ayanworks/credo-polygon-w3c-module": "1.0.1-alpha.1",
"@credo-ts/anoncreds": "0.5.3",
"@credo-ts/askar": "0.5.3",
"@credo-ts/core": "0.5.3",
Expand Down
18 changes: 17 additions & 1 deletion src/controllers/credentials/CredentialController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,20 @@ export class CredentialController extends Controller {
throw ErrorHandlingService.handle(error)
}
}
}

/**
* Return credentialRecord
*
* @param credentialRecordId
* @returns credentialRecord
*/
@Get('/:credentialRecordId/form-data')
public async credentialFormData(@Path('credentialRecordId') credentialRecordId: string) {
try {
const credentialDetails = await this.agent.credentials.getFormatData(credentialRecordId)
return credentialDetails
} catch (error) {
throw ErrorHandlingService.handle(error)
}
}
}
18 changes: 17 additions & 1 deletion src/controllers/multi-tenancy/MultiTenancyController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,22 @@ export class MultiTenancyController extends Controller {
throw ErrorHandlingService.handle(error)
}
}
@Security('apiKey')
@Get('/credentials/form-data/:tenantId/:credentialRecordId')
public async credentialFormData(
@Path('tenantId') tenantId: string,
@Path('credentialRecordId') credentialRecordId: string
) {
let credentialDetails
try {
await this.agent.modules.tenants.withTenantAgent({ tenantId }, async (tenantAgent) => {
credentialDetails = await tenantAgent.credentials.getFormatData(credentialRecordId)
})
return credentialDetails
} catch (error) {
throw ErrorHandlingService.handle(error)
}
}

@Security('apiKey')
@Get('/proofs/:tenantId')
Expand Down Expand Up @@ -1888,4 +1904,4 @@ export class MultiTenancyController extends Controller {
throw ErrorHandlingService.handle(error)
}
}
}
}
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
dependencies:
static-eval "2.0.2"

"@ayanworks/credo-polygon-w3c-module@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@ayanworks/credo-polygon-w3c-module/-/credo-polygon-w3c-module-1.0.0.tgz#e48dcb48f8708b2959ebe02fcf3a5e08b168d479"
integrity sha512-dqcPI07bxzzGlOUkSHsyTe6DNAcXC3kvVdzH6BtOzrRyQ6Pujtr+6Fwn9VAFEKI88Pdxsk2upHAtlj1TmaeFRw==
"@ayanworks/credo-polygon-w3c-module@1.0.1-alpha.1":
version "1.0.1-alpha.1"
resolved "https://registry.yarnpkg.com/@ayanworks/credo-polygon-w3c-module/-/credo-polygon-w3c-module-1.0.1-alpha.1.tgz#ddbc5135c9010cf1de15a7aef0bacaba49bc55fa"
integrity sha512-H2WDwcdtHG5aCzcFu4j/2zOTtU9mrM6xSGjK7JIuwJbCAOY7/dhSCAWEG2myBZDkNccOeC9NjMdDRDJfqORJNA==
dependencies:
"@ayanworks/polygon-did-registrar" "1.0.0"
"@ayanworks/polygon-did-resolver" "1.0.0"
"@ayanworks/polygon-schema-manager" "1.0.0"
"@ayanworks/polygon-schema-manager" "1.0.1-alpha.1"
"@credo-ts/askar" "0.5.3"
"@credo-ts/core" "0.5.3"
did-resolver "^4.1.0"
Expand Down Expand Up @@ -87,10 +87,10 @@
did-resolver "^4.1.0"
ethers "^5.1.0"

"@ayanworks/polygon-schema-manager@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@ayanworks/polygon-schema-manager/-/polygon-schema-manager-1.0.0.tgz#5f71320d93e874477906df15be1aacc32906d6aa"
integrity sha512-XByf/mydccNEnfiW83K9WlayvPgrRpLVqX7CwuHtdBTSlrhed+Vc9FnZLIQUsGGnlbowQVLaPteSaKg/lEYUzw==
"@ayanworks/polygon-schema-manager@1.0.1-alpha.1":
version "1.0.1-alpha.1"
resolved "https://registry.yarnpkg.com/@ayanworks/polygon-schema-manager/-/polygon-schema-manager-1.0.1-alpha.1.tgz#97b9d497739753a97c0ad452d6e6276ef7c69c43"
integrity sha512-Qkbp1bQ+PqakUb7jq15dWfQ3usM1SLmFJnNIgzInQICSoLo1wYjYPlRlRtfwsuebNV2V4NeZTLEKKvTetIL/Jg==
dependencies:
"@ayanworks/polygon-did-registry-contract" "3.0.0"
"@ayanworks/polygon-did-resolver" "1.0.0"
Expand Down Expand Up @@ -7911,4 +7911,4 @@ yn@3.1.1:
yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==