Skip to content

Commit

Permalink
feat: support multiple did methods
Browse files Browse the repository at this point in the history
Signed-off-by: bhavanakarwade <[email protected]>
  • Loading branch information
bhavanakarwade committed Mar 11, 2024
1 parent 6bc9a11 commit be17b60
Show file tree
Hide file tree
Showing 13 changed files with 2,924 additions and 482 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,23 @@
"@aries-framework/push-notifications": "^0.6.0",
"@aries-framework/question-answer": "^0.4.2",
"@aries-framework/tenants": "^0.4.2",
"@ayanworks/credo-polygon-w3c-module": "0.0.2-alpha.0",
"@hyperledger/anoncreds-nodejs": "^0.1.0",
"@hyperledger/aries-askar-nodejs": "^0.1.1",
"@hyperledger/indy-vdr-nodejs": "^0.1.0",
"@sphereon/pex": "^2.2.2",
"@sphereon/pex-models": "^2.1.2",
"@sphereon/ssi-types": "^0.17.5",
"@tsoa/runtime": "^6.0.0",
"@types/node-fetch": "^2.6.4",
"@types/ref-struct-di": "^1.1.9",
"@types/ws": "^7.4.7",
"@tsoa/runtime": "^6.0.0",
"axios": "^1.4.0",
"body-parser": "^1.20.0",
"cors": "^2.8.5",
"express": "^4.18.1",
"jsonpath": "^1.1.1",
"express-rate-limit": "^7.1.5",
"jsonpath": "^1.1.1",
"jsonwebtoken": "^9.0.2",
"node-fetch": "^2.6.7",
"patch-package": "^8.0.0",
Expand Down Expand Up @@ -111,4 +112,4 @@
"engines": {
"node": ">= 18"
}
}
}
79 changes: 68 additions & 11 deletions patches/@aries-framework+core+0.4.2.patch

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions src/cliAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
import { agentDependencies, HttpInboundTransport, WsInboundTransport } from '@aries-framework/node'
import { QuestionAnswerModule } from '@aries-framework/question-answer'
import { TenantsModule } from '@aries-framework/tenants'
import { PolygonDidRegistrar, PolygonDidResolver, PolygonModule } from '@ayanworks/credo-polygon-w3c-module'
import { anoncreds } from '@hyperledger/anoncreds-nodejs'
import { ariesAskar } from '@hyperledger/aries-askar-nodejs'
import { indyVdr } from '@hyperledger/indy-vdr-nodejs'
Expand All @@ -54,7 +55,7 @@ import jwt from 'jsonwebtoken'

import { setupServer } from './server'
import { TsLogger } from './utils/logger'
import { BCOVRIN_TEST_GENESIS } from './utils/util'
import { BCOVRIN_TEST_GENESIS, DID_CONTRACT_ADDRESS, RPC_URL, SCHEMA_MANAGER_CONTRACT_ADDRESS } from './utils/util'

export type Transports = 'ws' | 'http'
export type InboundTransport = {
Expand Down Expand Up @@ -126,8 +127,8 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]])
}),

dids: new DidsModule({
registrars: [new IndyVdrIndyDidRegistrar(), new KeyDidRegistrar()],
resolvers: [new IndyVdrIndyDidResolver(), new KeyDidResolver(), new WebDidResolver()],
registrars: [new IndyVdrIndyDidRegistrar(), new KeyDidRegistrar(), new PolygonDidRegistrar()],
resolvers: [new IndyVdrIndyDidResolver(), new KeyDidResolver(), new WebDidResolver(), new PolygonDidResolver()],
}),

anoncreds: new AnonCredsModule({
Expand Down Expand Up @@ -174,6 +175,13 @@ const getModules = (networkConfig: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]])
}),

questionAnswer: new QuestionAnswerModule(),
polygon: new PolygonModule({
didContractAddress: DID_CONTRACT_ADDRESS,
schemaManagerContractAddress: SCHEMA_MANAGER_CONTRACT_ADDRESS,
fileServerToken: '',
rpcUrl: RPC_URL,
serverUrl: '',
}),
}
}

Expand Down Expand Up @@ -359,4 +367,4 @@ export async function runRestAgent(restConfig: AriesRestConfig) {
app.listen(adminPort, () => {
logger.info(`Successfully started server on port ${adminPort}`)
})
}
}

Check failure on line 370 in src/cliAgent.ts

View workflow job for this annotation

GitHub Actions / Validate

Insert `⏎`
Loading

0 comments on commit be17b60

Please sign in to comment.