From c8aa444ff6b692b0b9fb26ac4a09a1187c6d71f6 Mon Sep 17 00:00:00 2001 From: Raphael Flechtner Date: Mon, 5 Aug 2024 18:33:31 +0200 Subject: [PATCH 1/4] chore(deps): update to latest rc of augment & type-definitions --- packages/asset-credentials/package.json | 2 +- packages/chain-helpers/package.json | 4 +- packages/credentials/package.json | 2 +- packages/did/package.json | 2 +- packages/sdk-js/package.json | 4 +- yarn.lock | 57 +++++++++++++++++-------- 6 files changed, 46 insertions(+), 25 deletions(-) diff --git a/packages/asset-credentials/package.json b/packages/asset-credentials/package.json index afa05361b..bc10706b3 100644 --- a/packages/asset-credentials/package.json +++ b/packages/asset-credentials/package.json @@ -34,7 +34,7 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "@kiltprotocol/augment-api": "*" + "@kiltprotocol/augment-api": "^1.0.0" }, "dependencies": { "@kiltprotocol/chain-helpers": "workspace:*", diff --git a/packages/chain-helpers/package.json b/packages/chain-helpers/package.json index 77a393465..e1f64bdbe 100644 --- a/packages/chain-helpers/package.json +++ b/packages/chain-helpers/package.json @@ -34,8 +34,8 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "@kiltprotocol/augment-api": "*", - "@kiltprotocol/type-definitions": "^0.35.0" + "@kiltprotocol/augment-api": "^1.0.0", + "@kiltprotocol/type-definitions": "^1.0.0" }, "peerDependenciesMeta": { "@kiltprotocol/augment-api": { diff --git a/packages/credentials/package.json b/packages/credentials/package.json index 4becb04bb..28733a08f 100644 --- a/packages/credentials/package.json +++ b/packages/credentials/package.json @@ -35,7 +35,7 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "@kiltprotocol/augment-api": "*" + "@kiltprotocol/augment-api": "^1.0.0" }, "dependencies": { "@kiltprotocol/chain-helpers": "workspace:*", diff --git a/packages/did/package.json b/packages/did/package.json index 9e7298b2e..d0b2c3b92 100644 --- a/packages/did/package.json +++ b/packages/did/package.json @@ -34,7 +34,7 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "@kiltprotocol/augment-api": "*" + "@kiltprotocol/augment-api": "^1.0.0" }, "dependencies": { "@digitalbazaar/multikey-context": "^2.0.1", diff --git a/packages/sdk-js/package.json b/packages/sdk-js/package.json index bb2b03389..6d382e892 100644 --- a/packages/sdk-js/package.json +++ b/packages/sdk-js/package.json @@ -32,7 +32,7 @@ "bugs": "https://github.com/KILTprotocol/sdk-js/issues", "homepage": "https://github.com/KILTprotocol/sdk-js#readme", "devDependencies": { - "@kiltprotocol/augment-api": "1.11210.0-rc", + "@kiltprotocol/augment-api": "rc", "@polkadot/typegen": "^12.0.0", "rimraf": "^3.0.2", "terser-webpack-plugin": "^5.1.1", @@ -45,7 +45,7 @@ "@kiltprotocol/config": "workspace:*", "@kiltprotocol/credentials": "workspace:*", "@kiltprotocol/did": "workspace:*", - "@kiltprotocol/type-definitions": "^0.35.0", + "@kiltprotocol/type-definitions": "rc", "@kiltprotocol/utils": "workspace:*", "@polkadot/api": "^12.0.0", "@polkadot/util": "^13.0.0" diff --git a/yarn.lock b/yarn.lock index 5a9ffb534..af755f7f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2002,16 +2002,16 @@ __metadata: rimraf: "npm:^3.0.2" typescript: "npm:^4.8.3" peerDependencies: - "@kiltprotocol/augment-api": "*" + "@kiltprotocol/augment-api": ^1.0.0 peerDependenciesMeta: "@kiltprotocol/augment-api": optional: true languageName: unknown linkType: soft -"@kiltprotocol/augment-api@npm:1.11210.0-rc": - version: 1.11210.0-rc - resolution: "@kiltprotocol/augment-api@npm:1.11210.0-rc" +"@kiltprotocol/augment-api@npm:rc": + version: 1.11300.0-rc.1 + resolution: "@kiltprotocol/augment-api@npm:1.11300.0-rc.1" dependencies: "@typescript-eslint/eslint-plugin": "npm:^7.0.2" "@typescript-eslint/parser": "npm:^7.0.2" @@ -2019,14 +2019,33 @@ __metadata: eslint: "npm:^8.57.0" eslint-plugin-unused-imports: "npm:^3.1.0" peerDependencies: - "@kiltprotocol/type-definitions": ^0.35.0 - "@polkadot/api": ~10.12.0 - "@polkadot/typegen": ~10.12.0 + "@kiltprotocol/type-definitions": ^1.11300.0-rc.1 + "@polkadot/api": ~12.2.0 + "@polkadot/typegen": ~12.2.0 + "@polkadot/types": ^12.2.0 typescript: "*" + dependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + "@typescript-eslint/parser": + optional: true + dotenv: + optional: true + eslint: + optional: true + eslint-plugin-unused-imports: + optional: true + peerDependenciesMeta: + "@kiltprotocol/type-definitions": + optional: true + "@polkadot/typegen": + optional: true + "@polkadot/types": + optional: true bin: kilt_reaugment: augmentFromFile.mjs kilt_updateMetadata: updateMetadata.mjs - checksum: 10c0/4f8d02d692261cb3eff75b887734a1867d122b1eee001132c2143ab46abf5d30e569251cb9b069a9955366cb0d6d8793b7b08b53e84e41eada2a4b7ddbc6f182 + checksum: 10c0/813897d1b9466b4749e7f657ca7c7a04086092e8052d7473723b01b3afb2cf948a0d71f2e8bf05af13de4ea15340ca1f8e261a3fabe546fe83fd824b5be5515e languageName: node linkType: hard @@ -2045,8 +2064,8 @@ __metadata: rimraf: "npm:^3.0.2" typescript: "npm:^4.8.3" peerDependencies: - "@kiltprotocol/augment-api": "*" - "@kiltprotocol/type-definitions": ^0.35.0 + "@kiltprotocol/augment-api": ^1.0.0 + "@kiltprotocol/type-definitions": ^1.0.0 peerDependenciesMeta: "@kiltprotocol/augment-api": optional: true @@ -2088,7 +2107,7 @@ __metadata: rimraf: "npm:^3.0.2" typescript: "npm:^4.8.3" peerDependencies: - "@kiltprotocol/augment-api": "*" + "@kiltprotocol/augment-api": ^1.0.0 peerDependenciesMeta: "@kiltprotocol/augment-api": optional: true @@ -2112,7 +2131,7 @@ __metadata: rimraf: "npm:^3.0.2" typescript: "npm:^4.8.3" peerDependencies: - "@kiltprotocol/augment-api": "*" + "@kiltprotocol/augment-api": ^1.0.0 peerDependenciesMeta: "@kiltprotocol/augment-api": optional: true @@ -2196,12 +2215,12 @@ __metadata: version: 0.0.0-use.local resolution: "@kiltprotocol/sdk-js@workspace:packages/sdk-js" dependencies: - "@kiltprotocol/augment-api": "npm:1.11210.0-rc" + "@kiltprotocol/augment-api": "npm:rc" "@kiltprotocol/chain-helpers": "workspace:*" "@kiltprotocol/config": "workspace:*" "@kiltprotocol/credentials": "workspace:*" "@kiltprotocol/did": "workspace:*" - "@kiltprotocol/type-definitions": "npm:^0.35.0" + "@kiltprotocol/type-definitions": "npm:rc" "@kiltprotocol/utils": "workspace:*" "@polkadot/api": "npm:^12.0.0" "@polkadot/typegen": "npm:^12.0.0" @@ -2227,10 +2246,12 @@ __metadata: languageName: node linkType: hard -"@kiltprotocol/type-definitions@npm:^0.35.0": - version: 0.35.0 - resolution: "@kiltprotocol/type-definitions@npm:0.35.0" - checksum: 10c0/810865fdf51d6441a394c35972a8f91fbf7cf99d1efceed34f9d9262e8b36762b30a36cd56985430c698f33c9f1c1d9d0dc51d15c68bffd8807cb6985a6cd78c +"@kiltprotocol/type-definitions@npm:rc": + version: 1.11300.0-rc.1 + resolution: "@kiltprotocol/type-definitions@npm:1.11300.0-rc.1" + peerDependencies: + "@polkadot/types": ^12.2.0 + checksum: 10c0/4b4ab3e26abfdb2a94adf30be96996fbcbae5ddfb9165ff1dff9b14f2123ac63edfe8e2e1cf6cf5bfc7d8ff1847cf922c511600ca0b82afd677fb4cbc9bb983a languageName: node linkType: hard From fc604a119f7c47fce3c80c9c6e2bc089fec4aff4 Mon Sep 17 00:00:00 2001 From: Raphael Flechtner Date: Mon, 5 Aug 2024 18:44:26 +0200 Subject: [PATCH 2/4] chore(deps): resolve peer deps warnings for kiltprotocol packages --- packages/asset-credentials/package.json | 3 ++- packages/credentials/package.json | 3 ++- packages/jsonld-suites/package.json | 1 + packages/legacy-credentials/package.json | 3 +++ packages/sdk-js/package.json | 1 + yarn.lock | 13 +++++++++++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/packages/asset-credentials/package.json b/packages/asset-credentials/package.json index bc10706b3..83a37e7af 100644 --- a/packages/asset-credentials/package.json +++ b/packages/asset-credentials/package.json @@ -34,7 +34,8 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "@kiltprotocol/augment-api": "^1.0.0" + "@kiltprotocol/augment-api": "^1.0.0", + "@kiltprotocol/type-definitions": "^1.0.0" }, "dependencies": { "@kiltprotocol/chain-helpers": "workspace:*", diff --git a/packages/credentials/package.json b/packages/credentials/package.json index 28733a08f..e1e7ad958 100644 --- a/packages/credentials/package.json +++ b/packages/credentials/package.json @@ -35,7 +35,8 @@ "typescript": "^4.8.3" }, "peerDependencies": { - "@kiltprotocol/augment-api": "^1.0.0" + "@kiltprotocol/augment-api": "^1.0.0", + "@kiltprotocol/type-definitions": "^1.0.0" }, "dependencies": { "@kiltprotocol/chain-helpers": "workspace:*", diff --git a/packages/jsonld-suites/package.json b/packages/jsonld-suites/package.json index c7cae11bb..c634b87ed 100644 --- a/packages/jsonld-suites/package.json +++ b/packages/jsonld-suites/package.json @@ -39,6 +39,7 @@ "@kiltprotocol/config": "workspace:*", "@kiltprotocol/credentials": "workspace:*", "@kiltprotocol/did": "workspace:*", + "@kiltprotocol/type-definitions": "^1.0.0", "@kiltprotocol/types": "workspace:*", "@kiltprotocol/utils": "workspace:*", "@polkadot/util": "^13.0.0", diff --git a/packages/legacy-credentials/package.json b/packages/legacy-credentials/package.json index 6a838e673..a67c1ea9b 100644 --- a/packages/legacy-credentials/package.json +++ b/packages/legacy-credentials/package.json @@ -33,6 +33,9 @@ "rimraf": "^3.0.2", "typescript": "^4.8.3" }, + "peerDependencies": { + "@kiltprotocol/type-definitions": "^1.0.0" + }, "dependencies": { "@kiltprotocol/config": "workspace:*", "@kiltprotocol/credentials": "workspace:*", diff --git a/packages/sdk-js/package.json b/packages/sdk-js/package.json index 6d382e892..ae92f25d7 100644 --- a/packages/sdk-js/package.json +++ b/packages/sdk-js/package.json @@ -48,6 +48,7 @@ "@kiltprotocol/type-definitions": "rc", "@kiltprotocol/utils": "workspace:*", "@polkadot/api": "^12.0.0", + "@polkadot/types": "^12.0.0", "@polkadot/util": "^13.0.0" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index af755f7f4..12f0dba2e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2003,6 +2003,7 @@ __metadata: typescript: "npm:^4.8.3" peerDependencies: "@kiltprotocol/augment-api": ^1.0.0 + "@kiltprotocol/type-definitions": ^1.0.0 peerDependenciesMeta: "@kiltprotocol/augment-api": optional: true @@ -2108,6 +2109,7 @@ __metadata: typescript: "npm:^4.8.3" peerDependencies: "@kiltprotocol/augment-api": ^1.0.0 + "@kiltprotocol/type-definitions": ^1.0.0 peerDependenciesMeta: "@kiltprotocol/augment-api": optional: true @@ -2182,6 +2184,7 @@ __metadata: "@kiltprotocol/config": "workspace:*" "@kiltprotocol/credentials": "workspace:*" "@kiltprotocol/did": "workspace:*" + "@kiltprotocol/type-definitions": "npm:^1.0.0" "@kiltprotocol/types": "workspace:*" "@kiltprotocol/utils": "workspace:*" "@polkadot/util": "npm:^13.0.0" @@ -2208,6 +2211,8 @@ __metadata: "@polkadot/util-crypto": "npm:^13.0.0" rimraf: "npm:^3.0.2" typescript: "npm:^4.8.3" + peerDependencies: + "@kiltprotocol/type-definitions": ^1.0.0 languageName: unknown linkType: soft @@ -2224,6 +2229,7 @@ __metadata: "@kiltprotocol/utils": "workspace:*" "@polkadot/api": "npm:^12.0.0" "@polkadot/typegen": "npm:^12.0.0" + "@polkadot/types": "npm:^12.0.0" "@polkadot/util": "npm:^13.0.0" rimraf: "npm:^3.0.2" terser-webpack-plugin: "npm:^5.1.1" @@ -2246,6 +2252,13 @@ __metadata: languageName: node linkType: hard +"@kiltprotocol/type-definitions@npm:^1.0.0": + version: 1.1.0 + resolution: "@kiltprotocol/type-definitions@npm:1.1.0" + checksum: 10c0/974c703128be6494056610e47556b2551e1c8e307f772e3ac27eb081edee98636a51578029acd1dc2298fe8ffe5f14897ea7919e23e739c7c26de6c3c983b92f + languageName: node + linkType: hard + "@kiltprotocol/type-definitions@npm:rc": version: 1.11300.0-rc.1 resolution: "@kiltprotocol/type-definitions@npm:1.11300.0-rc.1" From 4bfe9baf20f6e8bcab4a983dfc0cb7f805e88ba5 Mon Sep 17 00:00:00 2001 From: Raphael Flechtner Date: Mon, 5 Aug 2024 19:02:56 +0200 Subject: [PATCH 3/4] chore(deps): resolve @scure/base peer dep warnings --- packages/credentials/package.json | 1 + packages/utils/package.json | 1 + yarn.lock | 10 ++++++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/credentials/package.json b/packages/credentials/package.json index e1e7ad958..9d77b64d5 100644 --- a/packages/credentials/package.json +++ b/packages/credentials/package.json @@ -53,6 +53,7 @@ "@polkadot/types": "^12.0.0", "@polkadot/util": "^13.0.0", "@polkadot/util-crypto": "^13.0.0", + "@scure/base": "^1.1.0", "json-pointer": "^0.6.2" }, "peerDependenciesMeta": { diff --git a/packages/utils/package.json b/packages/utils/package.json index 6a159c30d..96a6ac0b3 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -44,6 +44,7 @@ "@polkadot/keyring": "^13.0.0", "@polkadot/util": "^13.0.0", "@polkadot/util-crypto": "^13.0.0", + "@scure/base": "^1.1.0", "cbor-web": "^9.0.0", "tweetnacl": "^1.0.3", "uuid": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 12f0dba2e..7bc33ba64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2103,6 +2103,7 @@ __metadata: "@polkadot/types": "npm:^12.0.0" "@polkadot/util": "npm:^13.0.0" "@polkadot/util-crypto": "npm:^13.0.0" + "@scure/base": "npm:^1.1.0" "@types/json-pointer": "npm:^1.0.34" json-pointer: "npm:^0.6.2" rimraf: "npm:^3.0.2" @@ -2295,6 +2296,7 @@ __metadata: "@polkadot/keyring": "npm:^13.0.0" "@polkadot/util": "npm:^13.0.0" "@polkadot/util-crypto": "npm:^13.0.0" + "@scure/base": "npm:^1.1.0" "@types/uuid": "npm:^8.0.0" cbor-web: "npm:^9.0.0" rimraf: "npm:^3.0.2" @@ -2890,10 +2892,10 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:^1.1.1, @scure/base@npm:^1.1.5": - version: 1.1.6 - resolution: "@scure/base@npm:1.1.6" - checksum: 10c0/237a46a1f45391fc57719154f14295db936a0b1562ea3e182dd42d7aca082dbb7062a28d6c49af16a7e478b12dae8a0fe678d921ea5056bcc30238d29eb05c55 +"@scure/base@npm:^1.1.0, @scure/base@npm:^1.1.1, @scure/base@npm:^1.1.5": + version: 1.1.7 + resolution: "@scure/base@npm:1.1.7" + checksum: 10c0/2d06aaf39e6de4b9640eb40d2e5419176ebfe911597856dcbf3bc6209277ddb83f4b4b02cb1fd1208f819654268ec083da68111d3530bbde07bae913e2fc2e5d languageName: node linkType: hard From 84193b5794521e85e04cb32daa0079a9610cab16 Mon Sep 17 00:00:00 2001 From: Raphael Flechtner Date: Mon, 5 Aug 2024 19:03:19 +0200 Subject: [PATCH 4/4] chore: do not import SignerInterface from jcs package --- packages/credentials/src/proofs/DataIntegrity.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/credentials/src/proofs/DataIntegrity.ts b/packages/credentials/src/proofs/DataIntegrity.ts index 3ef9ffc86..bad5eaed6 100644 --- a/packages/credentials/src/proofs/DataIntegrity.ts +++ b/packages/credentials/src/proofs/DataIntegrity.ts @@ -10,20 +10,20 @@ import { u8aConcat } from '@polkadot/util' import { base58Decode, base58Encode, sha256AsU8a } from '@polkadot/util-crypto' -import type { - CryptoSuite, - SignerInterface, -} from '@kiltprotocol/jcs-data-integrity-proofs-common' import { cryptosuite as eddsaSuite } from '@kiltprotocol/eddsa-jcs-2022' import { cryptosuite as ecdsaSuite } from '@kiltprotocol/es256k-jcs-2023' +import { + createVerifyData as createVerifyDataJcs, + type CryptoSuite, +} from '@kiltprotocol/jcs-data-integrity-proofs-common' import { cryptosuite as sr25519Suite } from '@kiltprotocol/sr25519-jcs-2023' -import { createVerifyData as createVerifyDataJcs } from '@kiltprotocol/jcs-data-integrity-proofs-common' import { parse, resolve } from '@kiltprotocol/did' import type { Did, DidDocument, DidUrl, + SignerInterface, VerificationMethod, } from '@kiltprotocol/types' import { SDKErrors, Signers } from '@kiltprotocol/utils'