From 44fddb3b0b0ae6037d3ecd8513a3bc490bcd013d Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Fri, 5 Jan 2024 17:33:19 +0100 Subject: [PATCH 1/2] bump cheqd packages --- package-lock.json | 274 +++++++++++++++++++++++++++++++--------------- package.json | 9 +- 2 files changed, 192 insertions(+), 91 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31c9f351..ef49424b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "@cheqd/credential-service", - "version": "2.15.0-develop.1", + "version": "2.15.0-develop.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cheqd/credential-service", - "version": "2.15.0-develop.1", + "version": "2.15.0-develop.2", "license": "Apache-2.0", "dependencies": { - "@cheqd/did-provider-cheqd": "^3.6.13", - "@cheqd/sdk": "^3.7.4", - "@cheqd/ts-proto": "^3.3.7", + "@cheqd/did-provider-cheqd": "^3.6.14", + "@cheqd/sdk": "^3.7.6", + "@cheqd/ts-proto": "^3.3.9", "@cosmjs/amino": "^0.32.2", "@cosmjs/encoding": "^0.32.2", "@logto/express": "^2.2.0", @@ -2622,17 +2622,17 @@ } }, "node_modules/@cheqd/did-provider-cheqd": { - "version": "3.6.13", - "resolved": "https://registry.npmjs.org/@cheqd/did-provider-cheqd/-/did-provider-cheqd-3.6.13.tgz", - "integrity": "sha512-YhoqehgNnTnKjVlFJ7heFA2Az+j5760+QjDtkWkqwe3yQ57zGfwIarBwN0b+ONyOLGLMXSltfmoiQVesocLbJQ==", - "dependencies": { - "@cheqd/sdk": "^3.7.4", - "@cheqd/ts-proto": "^3.3.6", - "@cosmjs/amino": "^0.31.1", - "@cosmjs/crypto": "^0.31.1", - "@cosmjs/proto-signing": "^0.31.1", - "@cosmjs/utils": "^0.31.1", - "@digitalbazaar/vc-status-list": "^7.0.0", + "version": "3.6.14", + "resolved": "https://registry.npmjs.org/@cheqd/did-provider-cheqd/-/did-provider-cheqd-3.6.14.tgz", + "integrity": "sha512-iX/sZKZup4KwbgNdOiMGHi+L14ecUSMPrgICsnpKx7Fj0SEvE5xMQrNPnM7AMNBQl9VmkQpipvuG+uoVCmVvyQ==", + "dependencies": { + "@cheqd/sdk": "^3.7.6", + "@cheqd/ts-proto": "^3.3.9", + "@cosmjs/amino": "^0.31.3", + "@cosmjs/crypto": "^0.31.3", + "@cosmjs/proto-signing": "^0.31.3", + "@cosmjs/utils": "^0.31.3", + "@digitalbazaar/vc-status-list": "^7.1.0", "@lit-protocol/lit-node-client": "^2.2.61", "@veramo/core": "^5.5.3", "@veramo/did-manager": "^5.5.3", @@ -2640,10 +2640,10 @@ "@veramo/key-manager": "^5.5.3", "@veramo/utils": "^5.5.3", "debug": "^4.3.4", - "did-jwt": "^7.4.3", + "did-jwt": "^7.4.7", "did-resolver": "^4.1.0", "generate-password": "^1.7.1", - "uint8arrays": "^4.0.6", + "uint8arrays": "^5.0.1", "uuid": "^9.0.1" }, "engines": { @@ -2671,27 +2671,43 @@ "readonly-date": "^1.0.0" } }, + "node_modules/@cheqd/did-provider-cheqd/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cheqd/did-provider-cheqd/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, "node_modules/@cheqd/sdk": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@cheqd/sdk/-/sdk-3.7.4.tgz", - "integrity": "sha512-j2fZY2+gyVWWy532f7/hKD7cNkE093M8BM15BxpHHXvC+BKsZc+7FfYr5710X+Y+YfQ72edh+KAzZjK3FJ9T/w==", - "dependencies": { - "@cheqd/ts-proto": "^3.3.6", - "@cosmjs/amino": "^0.31.1", - "@cosmjs/crypto": "^0.31.1", - "@cosmjs/encoding": "^0.31.1", - "@cosmjs/math": "^0.31.1", - "@cosmjs/proto-signing": "^0.31.1", - "@cosmjs/stargate": "^0.31.1", - "@cosmjs/tendermint-rpc": "^0.31.1", - "@cosmjs/utils": "^0.31.1", + "version": "3.7.6", + "resolved": "https://registry.npmjs.org/@cheqd/sdk/-/sdk-3.7.6.tgz", + "integrity": "sha512-+SaD/cGMPSfnKPiOi0y4grcV4qpDWB6U2CV3wWfkrDAaovwvWeob3C7ot8S453FoFH6WBUcMQBJQeNt9Rc+Clg==", + "dependencies": { + "@cheqd/ts-proto": "^3.3.9", + "@cosmjs/amino": "^0.31.3", + "@cosmjs/crypto": "^0.32.2", + "@cosmjs/encoding": "^0.31.3", + "@cosmjs/math": "^0.32.2", + "@cosmjs/proto-signing": "^0.31.3", + "@cosmjs/stargate": "^0.31.3", + "@cosmjs/tendermint-rpc": "^0.31.3", + "@cosmjs/utils": "^0.31.3", "@stablelib/ed25519": "^1.0.3", - "@types/secp256k1": "^4.0.5", - "cosmjs-types": "^0.8.0", - "did-jwt": "^7.4.3", + "@types/secp256k1": "^4.0.6", + "cosmjs-types": "^0.9.0", + "did-jwt": "^7.4.7", "did-resolver": "^4.1.0", - "file-type": "^18.5.0", - "multiformats": "^12.1.2", + "file-type": "^18.7.0", + "multiformats": "^12.1.3", "secp256k1": "^5.0.0", "uuid": "^9.0.1" }, @@ -2710,6 +2726,57 @@ "@cosmjs/utils": "^0.31.3" } }, + "node_modules/@cheqd/sdk/node_modules/@cosmjs/amino/node_modules/@cosmjs/crypto": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.31.3.tgz", + "integrity": "sha512-vRbvM9ZKR2017TO73dtJ50KxoGcFzKtKI7C8iO302BQ5p+DuB+AirUg1952UpSoLfv5ki9O416MFANNg8UN/EQ==", + "dependencies": { + "@cosmjs/encoding": "^0.31.3", + "@cosmjs/math": "^0.31.3", + "@cosmjs/utils": "^0.31.3", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.4", + "libsodium-wrappers-sumo": "^0.7.11" + } + }, + "node_modules/@cheqd/sdk/node_modules/@cosmjs/amino/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cheqd/sdk/node_modules/@cosmjs/crypto": { + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.32.2.tgz", + "integrity": "sha512-RuxrYKzhrPF9g6NmU7VEq++Hn1vZJjqqJpZ9Tmw9lOYOV8BUsv+j/0BE86kmWi7xVJ7EwxiuxYsKuM8IR18CIA==", + "dependencies": { + "@cosmjs/encoding": "^0.32.2", + "@cosmjs/math": "^0.32.2", + "@cosmjs/utils": "^0.32.2", + "@noble/hashes": "^1", + "bn.js": "^5.2.0", + "elliptic": "^6.5.4", + "libsodium-wrappers-sumo": "^0.7.11" + } + }, + "node_modules/@cheqd/sdk/node_modules/@cosmjs/crypto/node_modules/@cosmjs/encoding": { + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.32.2.tgz", + "integrity": "sha512-WX7m1wLpA9V/zH0zRcz4EmgZdAv1F44g4dbXOgNj1eXZw1PIGR12p58OEkLN51Ha3S4DKRtCv5CkhK1KHEvQtg==", + "dependencies": { + "base64-js": "^1.3.0", + "bech32": "^1.1.4", + "readonly-date": "^1.0.0" + } + }, + "node_modules/@cheqd/sdk/node_modules/@cosmjs/crypto/node_modules/@cosmjs/utils": { + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.32.2.tgz", + "integrity": "sha512-Gg5t+eR7vPJMAmhkFt6CZrzPd0EKpAslWwk5rFVYZpJsM8JG5KT9XQ99hgNM3Ov6ScNoIWbXkpX27F6A9cXR4Q==" + }, "node_modules/@cheqd/sdk/node_modules/@cosmjs/encoding": { "version": "0.31.3", "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.31.3.tgz", @@ -2730,9 +2797,9 @@ } }, "node_modules/@cheqd/ts-proto": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/@cheqd/ts-proto/-/ts-proto-3.3.7.tgz", - "integrity": "sha512-qvnucc0wxCIyCgJDRa0Dky6UZre7R8YzewnbYsFyAPNSugd+MhZpdMWHYjGcRImEQ1VJHz0n5lHJJ+OOf/Xehg==", + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/@cheqd/ts-proto/-/ts-proto-3.3.9.tgz", + "integrity": "sha512-OIOfcg0lkfeThsFHLOlbw8/uYVkFwtt7cuDBVA++vvfnTILPzMabku2T01PDQEhHAtqnKuY0hIpLLKLSgOY7Ow==", "dependencies": { "long": "^5.2.3", "protobufjs": "^7.2.5" @@ -2815,14 +2882,6 @@ "libsodium-wrappers-sumo": "^0.7.11" } }, - "node_modules/@cosmjs/amino/node_modules/@cosmjs/math": { - "version": "0.32.2", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.32.2.tgz", - "integrity": "sha512-b8+ruAAY8aKtVKWSft2IvtCVCUH1LigIlf9ALIiY8n9jtM4kMASiaRbQ/27etnSAInV88IaezKK9rQZrtxTjcw==", - "dependencies": { - "bn.js": "^5.2.0" - } - }, "node_modules/@cosmjs/amino/node_modules/@cosmjs/utils": { "version": "0.32.2", "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.32.2.tgz", @@ -2852,6 +2911,14 @@ "readonly-date": "^1.0.0" } }, + "node_modules/@cosmjs/crypto/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, "node_modules/@cosmjs/encoding": { "version": "0.32.2", "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.32.2.tgz", @@ -2872,9 +2939,9 @@ } }, "node_modules/@cosmjs/math": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", - "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "version": "0.32.2", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.32.2.tgz", + "integrity": "sha512-b8+ruAAY8aKtVKWSft2IvtCVCUH1LigIlf9ALIiY8n9jtM4kMASiaRbQ/27etnSAInV88IaezKK9rQZrtxTjcw==", "dependencies": { "bn.js": "^5.2.0" } @@ -2914,11 +2981,53 @@ "readonly-date": "^1.0.0" } }, + "node_modules/@cosmjs/proto-signing/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cosmjs/proto-signing/node_modules/cosmjs-types": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.8.0.tgz", + "integrity": "sha512-Q2Mj95Fl0PYMWEhA2LuGEIhipF7mQwd9gTQ85DdP9jjjopeoGaDxvmPa5nakNzsq7FnO1DMTatXTAx6bxMH7Lg==", + "dependencies": { + "long": "^4.0.0", + "protobufjs": "~6.11.2" + } + }, "node_modules/@cosmjs/proto-signing/node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "node_modules/@cosmjs/proto-signing/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/@cosmjs/socket": { "version": "0.31.3", "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.31.3.tgz", @@ -2970,6 +3079,23 @@ "readonly-date": "^1.0.0" } }, + "node_modules/@cosmjs/stargate/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, + "node_modules/@cosmjs/stargate/node_modules/cosmjs-types": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.8.0.tgz", + "integrity": "sha512-Q2Mj95Fl0PYMWEhA2LuGEIhipF7mQwd9gTQ85DdP9jjjopeoGaDxvmPa5nakNzsq7FnO1DMTatXTAx6bxMH7Lg==", + "dependencies": { + "long": "^4.0.0", + "protobufjs": "~6.11.2" + } + }, "node_modules/@cosmjs/stargate/node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -3035,6 +3161,14 @@ "readonly-date": "^1.0.0" } }, + "node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/math": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.31.3.tgz", + "integrity": "sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==", + "dependencies": { + "bn.js": "^5.2.0" + } + }, "node_modules/@cosmjs/utils": { "version": "0.31.3", "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.31.3.tgz", @@ -15161,43 +15295,9 @@ } }, "node_modules/cosmjs-types": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.8.0.tgz", - "integrity": "sha512-Q2Mj95Fl0PYMWEhA2LuGEIhipF7mQwd9gTQ85DdP9jjjopeoGaDxvmPa5nakNzsq7FnO1DMTatXTAx6bxMH7Lg==", - "dependencies": { - "long": "^4.0.0", - "protobufjs": "~6.11.2" - } - }, - "node_modules/cosmjs-types/node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "node_modules/cosmjs-types/node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.9.0.tgz", + "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==" }, "node_modules/create-hash": { "version": "1.2.0", diff --git a/package.json b/package.json index 0b9f96ee..07c98e10 100644 --- a/package.json +++ b/package.json @@ -43,15 +43,16 @@ ] }, "files": [ - "dist/**/*", + "dist", + "example.env", "LICENSE", "package.json", "README.md" ], "dependencies": { - "@cheqd/did-provider-cheqd": "^3.6.13", - "@cheqd/sdk": "^3.7.4", - "@cheqd/ts-proto": "^3.3.7", + "@cheqd/did-provider-cheqd": "^3.6.14", + "@cheqd/sdk": "^3.7.6", + "@cheqd/ts-proto": "^3.3.9", "@cosmjs/amino": "^0.32.2", "@cosmjs/encoding": "^0.32.2", "@logto/express": "^2.2.0", From 9c306733ef314f4d1a6aa86fc16cbc70a98c9472 Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Fri, 5 Jan 2024 17:42:33 +0100 Subject: [PATCH 2/2] npm run format --- src/controllers/credential-status.ts | 14 ++++---- src/services/identity/abstract.ts | 14 ++++---- src/services/identity/agent.ts | 20 +++++------ src/services/identity/index.ts | 15 ++++----- src/services/identity/local.ts | 8 +++-- src/services/identity/postgres.ts | 15 +++++---- src/types/credential-status.ts | 50 +++++++++++++++------------- src/types/credential.ts | 5 ++- src/types/presentation.ts | 1 - src/types/validation.ts | 2 -- 10 files changed, 70 insertions(+), 74 deletions(-) diff --git a/src/controllers/credential-status.ts b/src/controllers/credential-status.ts index 2a378aed..c22c067b 100644 --- a/src/controllers/credential-status.ts +++ b/src/controllers/credential-status.ts @@ -3,19 +3,18 @@ import { check, validationResult, query } from './validator/index.js'; import { fromString } from 'uint8arrays'; import { StatusCodes } from 'http-status-codes'; import { IdentityServiceStrategySetup } from '../services/identity/index.js'; -import type { - ITrackOperation, -} from '../types/shared.js'; +import type { ITrackOperation } from '../types/shared.js'; import type { CheckStatusListSuccessfulResponseBody, FeePaymentOptions } from '../types/credential-status.js'; import { DefaultStatusAction, DefaultStatusActionPurposeMap, - DefaultStatusActions, MinimalPaymentCondition + DefaultStatusActions, + MinimalPaymentCondition, } from '../types/credential-status.js'; import type { SearchStatusListQuery, SearchStatusListSuccessfulResponseBody, - SearchStatusListUnsuccessfulResponseBody + SearchStatusListUnsuccessfulResponseBody, } from '../types/credential-status.js'; import type { CheckStatusListRequestBody, @@ -28,13 +27,14 @@ import type { CreateUnencryptedStatusListRequestBody, CreateUnencryptedStatusListRequestQuery, CreateUnencryptedStatusListSuccessfulResponseBody, - CreateUnencryptedStatusListUnsuccessfulResponseBody, UpdateEncryptedStatusListRequestBody, + CreateUnencryptedStatusListUnsuccessfulResponseBody, + UpdateEncryptedStatusListRequestBody, UpdateEncryptedStatusListSuccessfulResponseBody, UpdateEncryptedStatusListUnsuccessfulResponseBody, UpdateUnencryptedStatusListRequestBody, UpdateUnencryptedStatusListRequestQuery, UpdateUnencryptedStatusListSuccessfulResponseBody, - UpdateUnencryptedStatusListUnsuccessfulResponseBody + UpdateUnencryptedStatusListUnsuccessfulResponseBody, } from '../types/credential-status.js'; import { BulkRevocationResult, diff --git a/src/services/identity/abstract.ts b/src/services/identity/abstract.ts index 5bebbb24..4ef972b8 100644 --- a/src/services/identity/abstract.ts +++ b/src/services/identity/abstract.ts @@ -24,20 +24,18 @@ import type { UnsuspensionResult, TransactionResult, } from '@cheqd/did-provider-cheqd'; -import type { - ITrackOperation, - ITrackResult, - VeramoAgent, -} from '../../types/shared'; +import type { ITrackOperation, ITrackResult, VeramoAgent } from '../../types/shared'; import type { VerificationOptions } from '../../types/credential'; import type { FeePaymentOptions } from '../../types/credential-status'; import type { CredentialRequest } from '../../types/credential'; import type { CheckStatusListOptions } from '../../types/credential-status'; import type { StatusOptions } from '../../types/credential-status'; import type { - BroadcastStatusListOptions, CreateEncryptedStatusListOptions, - CreateUnencryptedStatusListOptions, UpdateEncryptedStatusListOptions, - UpdateUnencryptedStatusListOptions + BroadcastStatusListOptions, + CreateEncryptedStatusListOptions, + CreateUnencryptedStatusListOptions, + UpdateEncryptedStatusListOptions, + UpdateUnencryptedStatusListOptions, } from '../../types/credential-status'; import type { IIdentityService } from './index.js'; import type { CustomerEntity } from '../../database/entities/customer.entity.js'; diff --git a/src/services/identity/agent.ts b/src/services/identity/agent.ts index 29ca1a79..b23306fa 100644 --- a/src/services/identity/agent.ts +++ b/src/services/identity/agent.ts @@ -51,24 +51,20 @@ import { import type { CheqdNetwork } from '@cheqd/sdk'; import { getDidKeyResolver as KeyDidResolver } from '@veramo/did-provider-key'; import { Resolver, ResolverRegistry } from 'did-resolver'; -import { - DefaultDidUrlPattern, - CreateAgentRequest, - VeramoAgent, -} from '../../types/shared.js'; +import { DefaultDidUrlPattern, CreateAgentRequest, VeramoAgent } from '../../types/shared.js'; import type { VerificationOptions } from '../../types/credential.js'; import type { FeePaymentOptions } from '../../types/credential-status.js'; import type { CredentialRequest } from '../../types/credential.js'; import { DefaultStatusActions } from '../../types/credential-status.js'; import type { CheckStatusListOptions } from '../../types/credential-status.js'; +import type { RevocationStatusOptions, StatusOptions, SuspensionStatusOptions } from '../../types/credential-status.js'; import type { - RevocationStatusOptions, - StatusOptions, - SuspensionStatusOptions -} from '../../types/credential-status.js'; -import type { - BroadcastStatusListOptions, CreateUnencryptedStatusListOptions, UpdateUnencryptedStatusListOptions, CreateEncryptedStatusListOptions, UpdateEncryptedStatusListOptions, - SearchStatusListResult + BroadcastStatusListOptions, + CreateUnencryptedStatusListOptions, + UpdateUnencryptedStatusListOptions, + CreateEncryptedStatusListOptions, + UpdateEncryptedStatusListOptions, + SearchStatusListResult, } from '../../types/credential-status.js'; import { MINIMAL_DENOM, VC_PROOF_FORMAT, VC_REMOVE_ORIGINAL_FIELDS } from '../../types/constants.js'; import { toCoin, toDefaultDkg, toMinimalDenom } from '../../helpers/helpers.js'; diff --git a/src/services/identity/index.ts b/src/services/identity/index.ts index ae76ad64..ffbbfae2 100644 --- a/src/services/identity/index.ts +++ b/src/services/identity/index.ts @@ -29,20 +29,19 @@ import type { UnsuspensionResult, TransactionResult, } from '@cheqd/did-provider-cheqd'; -import type { - ITrackOperation, - ITrackResult, - VeramoAgent, -} from '../../types/shared.js'; +import type { ITrackOperation, ITrackResult, VeramoAgent } from '../../types/shared.js'; import type { VerificationOptions } from '../../types/credential.js'; import type { FeePaymentOptions } from '../../types/credential-status.js'; import type { CredentialRequest } from '../../types/credential.js'; import type { CheckStatusListOptions } from '../../types/credential-status.js'; import type { StatusOptions } from '../../types/credential-status.js'; import type { - BroadcastStatusListOptions, CreateEncryptedStatusListOptions, - CreateUnencryptedStatusListOptions, SearchStatusListResult, UpdateEncryptedStatusListOptions, - UpdateUnencryptedStatusListOptions + BroadcastStatusListOptions, + CreateEncryptedStatusListOptions, + CreateUnencryptedStatusListOptions, + SearchStatusListResult, + UpdateEncryptedStatusListOptions, + UpdateUnencryptedStatusListOptions, } from '../../types/credential-status.js'; import type { CustomerEntity } from '../../database/entities/customer.entity.js'; import type { KeyEntity } from '../../database/entities/key.entity.js'; diff --git a/src/services/identity/local.ts b/src/services/identity/local.ts index 59cc80c2..fa9f9f97 100644 --- a/src/services/identity/local.ts +++ b/src/services/identity/local.ts @@ -22,9 +22,11 @@ import type { CredentialRequest } from '../../types/credential.js'; import type { CheckStatusListOptions } from '../../types/credential-status.js'; import type { StatusOptions } from '../../types/credential-status.js'; import type { - BroadcastStatusListOptions, CreateEncryptedStatusListOptions, - CreateUnencryptedStatusListOptions, UpdateEncryptedStatusListOptions, - UpdateUnencryptedStatusListOptions + BroadcastStatusListOptions, + CreateEncryptedStatusListOptions, + CreateUnencryptedStatusListOptions, + UpdateEncryptedStatusListOptions, + UpdateUnencryptedStatusListOptions, } from '../../types/credential-status.js'; import { DefaultIdentityService } from './default.js'; import { Connection } from '../../database/connection/connection.js'; diff --git a/src/services/identity/postgres.ts b/src/services/identity/postgres.ts index c69f8917..e57ac051 100644 --- a/src/services/identity/postgres.ts +++ b/src/services/identity/postgres.ts @@ -23,18 +23,19 @@ import { DefaultRPCUrls, type TransactionResult, } from '@cheqd/did-provider-cheqd'; -import { - DefaultDidUrlPattern, - VeramoAgent, - ITrackResult, - ITrackOperation, -} from '../../types/shared.js'; +import { DefaultDidUrlPattern, VeramoAgent, ITrackResult, ITrackOperation } from '../../types/shared.js'; import type { VerificationOptions } from '../../types/credential.js'; import type { FeePaymentOptions } from '../../types/credential-status.js'; import type { CredentialRequest } from '../../types/credential.js'; import type { CheckStatusListOptions } from '../../types/credential-status.js'; import type { StatusOptions } from '../../types/credential-status.js'; -import type { BroadcastStatusListOptions, CreateUnencryptedStatusListOptions, UpdateUnencryptedStatusListOptions, CreateEncryptedStatusListOptions, UpdateEncryptedStatusListOptions } from '../../types/credential-status.js'; +import type { + BroadcastStatusListOptions, + CreateUnencryptedStatusListOptions, + UpdateUnencryptedStatusListOptions, + CreateEncryptedStatusListOptions, + UpdateEncryptedStatusListOptions, +} from '../../types/credential-status.js'; import { Connection } from '../../database/connection/connection.js'; import type { CustomerEntity } from '../../database/entities/customer.entity.js'; import { Veramo } from './agent.js'; diff --git a/src/types/credential-status.ts b/src/types/credential-status.ts index a0194179..44a3bc65 100644 --- a/src/types/credential-status.ts +++ b/src/types/credential-status.ts @@ -3,18 +3,18 @@ import { CreateStatusList2021Result, BulkRevocationResult, BulkSuspensionResult, - BulkUnsuspensionResult, DefaultStatusList2021StatusPurposeType, + BulkUnsuspensionResult, + DefaultStatusList2021StatusPurposeType, StatusCheckResult, LinkedResourceMetadataResolutionResult, StatusList2021Revocation, StatusList2021Suspension, ICheqdCheckCredentialWithStatusList2021StatusOptions, - DefaultStatusList2021StatusPurposeTypes + DefaultStatusList2021StatusPurposeTypes, } from '@cheqd/did-provider-cheqd'; import type { CheqdNetwork } from '@cheqd/sdk'; import type { AlternativeUri } from '@cheqd/ts-proto/cheqd/resource/v2'; - export type CreateUnencryptedStatusListRequestBody = { did: string; statusListName: string; @@ -30,7 +30,8 @@ export type CreateUnencryptedStatusListRequestQuery = { }; export type CreateUnencryptedStatusListSuccessfulResponseBody = Pick< - CreateStatusList2021Result, 'created' | 'error' | 'resource' | 'resourceMetadata' + CreateStatusList2021Result, + 'created' | 'error' | 'resource' | 'resourceMetadata' >; export type CreateUnencryptedStatusListUnsuccessfulResponseBody = { @@ -48,7 +49,8 @@ export type CreateEncryptedStatusListRequestBody = CreateUnencryptedStatusListRe export type CreateEncryptedStatusListRequestQuery = CreateUnencryptedStatusListRequestQuery; export type CreateEncryptedStatusListSuccessfulResponseBody = Pick< - CreateStatusList2021Result, 'created' | 'error' | 'resource' | 'resourceMetadata' | 'symmetricKey' + CreateStatusList2021Result, + 'created' | 'error' | 'resource' | 'resourceMetadata' | 'symmetricKey' >; export type CreateEncryptedStatusListUnsuccessfulResponseBody = CreateUnencryptedStatusListUnsuccessfulResponseBody; @@ -67,13 +69,14 @@ export type UpdateUnencryptedStatusListRequestQuery = { export type UpdateUnencryptedStatusListSuccessfulResponseBody = { updated: true; } & Pick & { - revoked?: BulkRevocationResult['revoked']; - suspended?: BulkSuspensionResult['suspended']; - unsuspended?: BulkUnsuspensionResult['unsuspended']; - resource?: BulkRevocationResult['statusList'] | - BulkSuspensionResult['statusList'] | - BulkUnsuspensionResult['statusList']; -}; + revoked?: BulkRevocationResult['revoked']; + suspended?: BulkSuspensionResult['suspended']; + unsuspended?: BulkUnsuspensionResult['unsuspended']; + resource?: + | BulkRevocationResult['statusList'] + | BulkSuspensionResult['statusList'] + | BulkUnsuspensionResult['statusList']; + }; export type UpdateUnencryptedStatusListUnsuccessfulResponseBody = { updated: false; @@ -96,15 +99,17 @@ export type UpdateEncryptedStatusListRequestQuery = UpdateUnencryptedStatusListR export type UpdateEncryptedStatusListSuccessfulResponseBody = { updated: true; } & Pick< - BulkRevocationResult | BulkSuspensionResult | BulkUnsuspensionResult, 'error' | 'resourceMetadata' | 'symmetricKey' + BulkRevocationResult | BulkSuspensionResult | BulkUnsuspensionResult, + 'error' | 'resourceMetadata' | 'symmetricKey' > & { - revoked?: BulkRevocationResult['revoked']; - suspended?: BulkSuspensionResult['suspended']; - unsuspended?: BulkUnsuspensionResult['unsuspended']; - resource?: BulkRevocationResult['statusList'] | - BulkSuspensionResult['statusList'] | - BulkUnsuspensionResult['statusList']; -}; + revoked?: BulkRevocationResult['revoked']; + suspended?: BulkSuspensionResult['suspended']; + unsuspended?: BulkUnsuspensionResult['unsuspended']; + resource?: + | BulkRevocationResult['statusList'] + | BulkSuspensionResult['statusList'] + | BulkUnsuspensionResult['statusList']; + }; export type UpdateEncryptedStatusListUnsuccessfulResponseBody = UpdateUnencryptedStatusListUnsuccessfulResponseBody; @@ -190,8 +195,8 @@ export type StatusOptions = { indexNotIn?: number[]; }; -export type RevocationStatusOptions = StatusOptions & { statusPurpose: 'revocation'; }; -export type SuspensionStatusOptions = StatusOptions & { statusPurpose: 'suspension'; }; +export type RevocationStatusOptions = StatusOptions & { statusPurpose: 'revocation' }; +export type SuspensionStatusOptions = StatusOptions & { statusPurpose: 'suspension' }; export type CheckStatusListOptions = Omit; export const DefaultStatusActions = { revoke: 'revoke', @@ -218,4 +223,3 @@ export type FeePaymentOptions = { feePaymentNetwork: CheqdNetwork; memo?: string; }; - diff --git a/src/types/credential.ts b/src/types/credential.ts index 57bdfc34..abd166a6 100644 --- a/src/types/credential.ts +++ b/src/types/credential.ts @@ -1,7 +1,6 @@ import type { VerificationPolicies } from '@veramo/core'; import type { StatusOptions } from './credential-status.js'; - export interface CredentialRequest { subjectDid: string; attributes: Record; @@ -14,11 +13,11 @@ export interface CredentialRequest { credentialSchema?: string; credentialName?: string; credentialSummary?: string; -}export interface VerificationOptions { +} +export interface VerificationOptions { fetchRemoteContexts?: boolean; policies?: VerificationPolicies; domain?: string; verifyStatus?: boolean; } export type DateType = string | Date; - diff --git a/src/types/presentation.ts b/src/types/presentation.ts index 384bbb09..0eff329b 100644 --- a/src/types/presentation.ts +++ b/src/types/presentation.ts @@ -1,4 +1,3 @@ - export type VerifyPresentationResponseBody = { verified: false; error: string; diff --git a/src/types/validation.ts b/src/types/validation.ts index 3f920fc5..80db8aca 100644 --- a/src/types/validation.ts +++ b/src/types/validation.ts @@ -1,4 +1,3 @@ - export type CreateDIDService = { idFragment: string; type: string; @@ -23,4 +22,3 @@ export type CheqdCredentialStatus = { statusPurpose: string; statusListIndex: string; }; -