From 40c9f56d774f230059dbcc6d5ac8d508ff2e11fc Mon Sep 17 00:00:00 2001 From: tipusinghaw <126460794+tipusinghaw@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:47:47 +0530 Subject: [PATCH] feat: migrate to amoy (#27) --- .github/workflows/continuous-integration.yml | 4 +- package.json | 13 ++-- tests/polygon-did.e2e.test.ts | 2 +- tests/polygon-schema.test.ts | 2 +- tests/utils.ts | 2 +- yarn.lock | 77 +++++++++++++++----- 6 files changed, 70 insertions(+), 30 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index b1191d0..1523b87 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -22,7 +22,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 18.19.0 cache: 'yarn' - name: Install dependencies @@ -51,7 +51,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 18.19.0 cache: 'yarn' - name: Install dependencies diff --git a/package.json b/package.json index 48bad28..8d14282 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ "lint": "eslint --ignore-path .gitignore ." }, "dependencies": { - "@credo-ts/askar": "0.5.0", - "@credo-ts/core": "0.5.0", - "@ayanworks/polygon-did-registrar": "0.0.16-alpha.13", - "@ayanworks/polygon-did-resolver": "0.0.16-alpha.10", - "@ayanworks/polygon-schema-manager": "0.0.2-alpha.5", + "@credo-ts/askar": "0.5.1", + "@credo-ts/core": "0.5.1", + "@ayanworks/polygon-did-registrar": "0.0.16-alpha.16", + "@ayanworks/polygon-did-resolver": "0.0.16-alpha.11", + "@ayanworks/polygon-schema-manager": "0.0.2-alpha.6", "did-resolver": "^4.1.0", "ethers": "^6.9.0" }, @@ -59,5 +59,8 @@ "ts-node": "^10.8.1", "tsconfig-paths": "^4.1.2", "typescript": "~4.9.5" + }, + "engines": { + "node": "18.19.0" } } diff --git a/tests/polygon-did.e2e.test.ts b/tests/polygon-did.e2e.test.ts index bc36899..71f82d4 100644 --- a/tests/polygon-did.e2e.test.ts +++ b/tests/polygon-did.e2e.test.ts @@ -47,7 +47,7 @@ describe('Polygon Module did resolver', () => { askar: new AskarModule({ ariesAskar }), // Add required modules polygon: new PolygonModule({ - rpcUrl: 'https://rpc-mumbai.maticvigil.com/', + rpcUrl: 'https://rpc-amoy.polygon.technology', didContractAddress: '0x12513116875BB3E4F098Ce74624739Ee51bAf023', fileServerToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6IjdmYjRmN2I3LWQ5ZWUtNDYxOC04OTE4LWZiMmIzYzY1M2EyYiJ9.x-kHeTVqX4w19ibSAspCYgIL-JFVss8yZ0CT21QVRYM', diff --git a/tests/polygon-schema.test.ts b/tests/polygon-schema.test.ts index 31eecc7..bf36dd1 100644 --- a/tests/polygon-schema.test.ts +++ b/tests/polygon-schema.test.ts @@ -108,7 +108,7 @@ describe('Polygon Module did resolver', () => { askar: new AskarModule({ ariesAskar }), // Add required modules polygon: new PolygonModule({ - rpcUrl: 'https://rpc-mumbai.maticvigil.com/', + rpcUrl: 'https://rpc-amoy.polygon.technology', didContractAddress: '0x12513116875BB3E4F098Ce74624739Ee51bAf023', fileServerToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6IjdmYjRmN2I3LWQ5ZWUtNDYxOC04OTE4LWZiMmIzYzY1M2EyYiJ9.x-kHeTVqX4w19ibSAspCYgIL-JFVss8yZ0CT21QVRYM', diff --git a/tests/utils.ts b/tests/utils.ts index e9a69c7..854f84b 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -57,7 +57,7 @@ export function getAgentConfig( ): AgentConfig & { walletConfig: WalletConfig } { const { config, dependencies } = getAgentOptions(name, extraConfig, { polygon: new PolygonModule({ - rpcUrl: 'https://rpc-mumbai.maticvigil.com/', + rpcUrl: 'https://rpc-amoy.polygon.technology', didContractAddress: '0x12513116875BB3E4F098Ce74624739Ee51bAf023', fileServerToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6IjdmYjRmN2I3LWQ5ZWUtNDYxOC04OTE4LWZiMmIzYzY1M2EyYiJ9.x-kHeTVqX4w19ibSAspCYgIL-JFVss8yZ0CT21QVRYM', diff --git a/yarn.lock b/yarn.lock index be372e2..e75a04d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -49,14 +49,14 @@ dependencies: static-eval "2.0.2" -"@ayanworks/polygon-did-registrar@0.0.16-alpha.13": - version "0.0.16-alpha.13" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registrar/-/polygon-did-registrar-0.0.16-alpha.13.tgz#cdb7f4dfee1f6e97006630d57c3a520051c09aeb" - integrity sha512-fihShp7HMMtzwuxV0VAVk/piktr/auig2Gj0rGq0S1x0GWP0NbZy7baLZvsVx4/kjgFNqu6cv3p42dmYVnRuIg== +"@ayanworks/polygon-did-registrar@0.0.16-alpha.16": + version "0.0.16-alpha.16" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registrar/-/polygon-did-registrar-0.0.16-alpha.16.tgz#8467412a8138ffb8b2305bf4ea7914a4ce979267" + integrity sha512-q3Y1bzeHmCAxRpbA6rXKaO9CQhLjlP4aMZuJxYiiicPlQ6plkRt+Icxdp1ozsCEcMouj3l4E5kgzjK48bhOxrw== dependencies: "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.3" - "@ayanworks/polygon-did-resolver" "^0.0.16-alpha.10" - "@credo-ts/core" "0.5.0" + "@ayanworks/polygon-did-resolver" "^0.0.16-alpha.11" + "@credo-ts/core" "0.5.1" "@ethersproject/basex" "^5.7.0" "@ethersproject/signing-key" "^5.7.0" "@ethersproject/transactions" "^5.7.0" @@ -70,22 +70,22 @@ resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registry-contract/-/polygon-did-registry-contract-2.0.1-alpha.3.tgz#7bb932b712a4c48df857682f27adfb08154c4358" integrity sha512-8FZZVAmzXZn0pjZasuxdRblL0obK91JoaoXzpM4oZ7hD5VRUbiWf7BTh17WsWc6Oaf6XtafT4csuBo11fZiUoQ== -"@ayanworks/polygon-did-resolver@0.0.16-alpha.10", "@ayanworks/polygon-did-resolver@^0.0.16-alpha.10", "@ayanworks/polygon-did-resolver@^0.0.16-alpha.3": - version "0.0.16-alpha.10" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-resolver/-/polygon-did-resolver-0.0.16-alpha.10.tgz#85eb53f2f6dd53c5e6342e9d6d0c70bb560fa281" - integrity sha512-RfxDr+bggYcLsdN6nK+VKwjVLZzy3AqGULSsYT2bU+4n8obptufVIDg1cjbI4zi0eQIVmtkUeaHcJMlaR6wvvA== +"@ayanworks/polygon-did-resolver@0.0.16-alpha.11", "@ayanworks/polygon-did-resolver@^0.0.16-alpha.11": + version "0.0.16-alpha.11" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-resolver/-/polygon-did-resolver-0.0.16-alpha.11.tgz#fe115f9a63eea5e0604712549e9c573dcef7d55c" + integrity sha512-rQ6iVz0uht/hLkYA29E2iHN7xW0EusG6ognndBJF0QUxuPBB2kbmcr/4kW1E1m8FJLPvmEX/ed5v0pbBnGSJwA== dependencies: "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.3" did-resolver "^4.1.0" ethers "^5.1.0" -"@ayanworks/polygon-schema-manager@0.0.2-alpha.5": - version "0.0.2-alpha.5" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-schema-manager/-/polygon-schema-manager-0.0.2-alpha.5.tgz#f5b29b513c07f28eb52f52d6fa33ffec0b919370" - integrity sha512-0BnJ2FxmHnLia2zDxj7MPRnD7u5FA3LZF8xwuZf5vlHE9Jh/sgV6dQg5XMnPYmyhdlxSrTQ8FpNZbAir2PuMGQ== +"@ayanworks/polygon-schema-manager@0.0.2-alpha.6": + version "0.0.2-alpha.6" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-schema-manager/-/polygon-schema-manager-0.0.2-alpha.6.tgz#a872afc1166e39561dba63f0ba83f898376bb874" + integrity sha512-H8W0eS//Q3eDCiwtEqfqPhGW3bRLWOkJU1EYOuiwZGaIuZb4kWbYqAGdgl0s5g0ZP1rjirk4Ztx1w10cWqsZWw== dependencies: "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.3" - "@ayanworks/polygon-did-resolver" "^0.0.16-alpha.3" + "@ayanworks/polygon-did-resolver" "^0.0.16-alpha.11" "@nomicfoundation/hardhat-verify" "^2.0.3" axios "^1.6.3" did-resolver "^4.1.0" @@ -506,12 +506,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@credo-ts/askar@0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@credo-ts/askar/-/askar-0.5.0.tgz#5fa2e6443fe3ae1b15c8b66eb73e63beb5c096a1" - integrity sha512-84wxDU6GbucBTe4HV7gUbCieFdhXVX19q8o6dNK8a3zl87yiV3OVwPwtnzghjh47vv14Xr+gWRvqbRvZrhRsaA== +"@credo-ts/askar@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@credo-ts/askar/-/askar-0.5.1.tgz#107d2f91f6afecb77fc7f24556725ec0e7597989" + integrity sha512-O3XWnmpnEe5U/a0kGQHigzXPw6/SXKp2v4ob3DJdHA0kiK3DywANNeG/Hw44lxdg24nNpizmVlO5EjRa6ULcmw== dependencies: - "@credo-ts/core" "0.5.0" + "@credo-ts/core" "0.5.1" bn.js "^5.2.1" class-transformer "0.5.1" class-validator "0.14.1" @@ -555,6 +555,43 @@ varint "^6.0.0" web-did-resolver "^2.0.21" +"@credo-ts/core@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@credo-ts/core/-/core-0.5.1.tgz#bb38e2f5451753cea1d3a73b1d407255af02c4ed" + integrity sha512-ywwFw6wwiMft3A994Y91LAm8CrEg2G7CJQRyLD8UzneU4coMWZTeED63thAEX6XK/tyDmv2MAcrO04hE3KQPcA== + dependencies: + "@digitalcredentials/jsonld" "^6.0.0" + "@digitalcredentials/jsonld-signatures" "^9.4.0" + "@digitalcredentials/vc" "^6.0.1" + "@multiformats/base-x" "^4.0.1" + "@sd-jwt/core" "^0.2.1" + "@sd-jwt/decode" "^0.2.1" + "@sphereon/pex" "3.3.0" + "@sphereon/pex-models" "^2.2.2" + "@sphereon/ssi-types" "^0.18.1" + "@stablelib/ed25519" "^1.0.2" + "@stablelib/sha256" "^1.0.1" + "@types/ws" "^8.5.4" + abort-controller "^3.0.0" + big-integer "^1.6.51" + borc "^3.0.0" + buffer "^6.0.3" + class-transformer "0.5.1" + class-validator "0.14.1" + did-resolver "^4.1.0" + jsonpath "^1.1.1" + lru_map "^0.4.1" + luxon "^3.3.0" + make-error "^1.3.6" + object-inspect "^1.10.3" + query-string "^7.0.1" + reflect-metadata "^0.1.13" + rxjs "^7.8.0" + tsyringe "^4.8.0" + uuid "^9.0.0" + varint "^6.0.0" + web-did-resolver "^2.0.21" + "@credo-ts/node@0.5.0": version "0.5.0" resolved "https://registry.yarnpkg.com/@credo-ts/node/-/node-0.5.0.tgz#d28ed5040f9925777a65f66f55abed7c2d2e53de"