Skip to content

Commit 07abaf2

Browse files
authored
chore(deps): polkadot-js as peer dependency (#896)
* chore: make pjs peer dependency in sub-packages * fix: messed-up imports * chore: make some imports more direct
1 parent 690b873 commit 07abaf2

File tree

15 files changed

+132
-75
lines changed

15 files changed

+132
-75
lines changed

packages/asset-credentials/package.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,30 @@
3535
},
3636
"peerDependencies": {
3737
"@kiltprotocol/augment-api": "^1.0.0",
38-
"@kiltprotocol/type-definitions": "^1.0.0"
38+
"@kiltprotocol/type-definitions": "^1.0.0",
39+
"@polkadot/api": "^12.0.0",
40+
"@polkadot/keyring": "^13.0.0",
41+
"@polkadot/types": "^12.0.0",
42+
"@polkadot/util": "^13.0.0",
43+
"@polkadot/util-crypto": "^13.0.0"
3944
},
4045
"dependencies": {
4146
"@kiltprotocol/chain-helpers": "workspace:*",
4247
"@kiltprotocol/config": "workspace:*",
4348
"@kiltprotocol/credentials": "workspace:*",
4449
"@kiltprotocol/did": "workspace:*",
4550
"@kiltprotocol/types": "workspace:*",
46-
"@kiltprotocol/utils": "workspace:*",
47-
"@polkadot/api": "^12.0.0",
48-
"@polkadot/types": "^12.0.0",
49-
"@polkadot/util": "^13.0.0",
50-
"@polkadot/util-crypto": "^13.0.0"
51+
"@kiltprotocol/utils": "workspace:*"
5152
},
5253
"peerDependenciesMeta": {
5354
"@kiltprotocol/augment-api": {
5455
"optional": true
56+
},
57+
"@polkadot/types": {
58+
"optional": true
59+
},
60+
"@polkadot/util": {
61+
"optional": true
5562
}
5663
}
5764
}

packages/chain-helpers/package.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,28 @@
3535
},
3636
"peerDependencies": {
3737
"@kiltprotocol/augment-api": "^1.0.0",
38-
"@kiltprotocol/type-definitions": "^1.0.0"
38+
"@kiltprotocol/type-definitions": "^1.0.0",
39+
"@polkadot/api": "^12.0.0",
40+
"@polkadot/api-derive": "^12.0.0",
41+
"@polkadot/keyring": "^13.0.0",
42+
"@polkadot/types": "^12.0.0",
43+
"@polkadot/util": "^13.0.0",
44+
"@polkadot/util-crypto": "^13.0.0"
3945
},
4046
"peerDependenciesMeta": {
4147
"@kiltprotocol/augment-api": {
4248
"optional": true
49+
},
50+
"@polkadot/api-derive": {
51+
"optional": true
52+
},
53+
"@polkadot/types": {
54+
"optional": true
4355
}
4456
},
4557
"dependencies": {
4658
"@kiltprotocol/config": "workspace:*",
4759
"@kiltprotocol/types": "workspace:*",
48-
"@kiltprotocol/utils": "workspace:*",
49-
"@polkadot/api": "^12.0.0",
50-
"@polkadot/api-derive": "^12.0.0",
51-
"@polkadot/types": "^12.0.0",
52-
"@polkadot/util": "^13.0.0",
53-
"@polkadot/util-crypto": "^13.0.0"
60+
"@kiltprotocol/utils": "workspace:*"
5461
}
5562
}

packages/config/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@
3535
"rimraf": "^3.0.2",
3636
"typescript": "^4.8.3"
3737
},
38+
"peerDependencies": {
39+
"@polkadot/api": "^12.0.0"
40+
},
41+
"peerDependenciesMeta": {
42+
"@polkadot/api": {
43+
"optional": true
44+
}
45+
},
3846
"dependencies": {
3947
"@kiltprotocol/types": "workspace:*",
40-
"@polkadot/api": "^12.0.0",
4148
"typescript-logging": "^1.0.0"
4249
}
4350
}

packages/credentials/package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
"rimraf": "^3.0.2",
3535
"typescript": "^4.8.3"
3636
},
37-
"peerDependencies": {
38-
"@kiltprotocol/augment-api": "^1.0.0",
39-
"@kiltprotocol/type-definitions": "^1.0.0"
40-
},
4137
"dependencies": {
4238
"@kiltprotocol/chain-helpers": "workspace:*",
4339
"@kiltprotocol/config": "workspace:*",
@@ -48,17 +44,24 @@
4844
"@kiltprotocol/sr25519-jcs-2023": "0.1.0-rc.4",
4945
"@kiltprotocol/types": "workspace:*",
5046
"@kiltprotocol/utils": "workspace:*",
47+
"@scure/base": "^1.1.0",
48+
"json-pointer": "^0.6.2"
49+
},
50+
"peerDependencies": {
51+
"@kiltprotocol/augment-api": "^1.0.0",
52+
"@kiltprotocol/type-definitions": "^1.0.0",
5153
"@polkadot/api": "^12.0.0",
5254
"@polkadot/keyring": "^13.0.0",
5355
"@polkadot/types": "^12.0.0",
5456
"@polkadot/util": "^13.0.0",
55-
"@polkadot/util-crypto": "^13.0.0",
56-
"@scure/base": "^1.1.0",
57-
"json-pointer": "^0.6.2"
57+
"@polkadot/util-crypto": "^13.0.0"
5858
},
5959
"peerDependenciesMeta": {
6060
"@kiltprotocol/augment-api": {
6161
"optional": true
62+
},
63+
"@polkadot/api": {
64+
"optional": true
6265
}
6366
}
6467
}

packages/credentials/src/V1/KiltAttestationProofV1.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
import type { ApiPromise } from '@polkadot/api'
99
import type { QueryableStorageEntry } from '@polkadot/api/types'
1010
import type { Option, u64, Vec } from '@polkadot/types'
11-
import type {
12-
AccountId,
13-
Extrinsic,
14-
Hash,
15-
} from '@polkadot/types/interfaces/types.js'
11+
import type { AccountId, Extrinsic, Hash } from '@polkadot/types/interfaces'
1612
import type { IEventData } from '@polkadot/types/types'
1713
import {
1814
hexToU8a,

packages/did/package.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,29 @@
3434
"typescript": "^4.8.3"
3535
},
3636
"peerDependencies": {
37-
"@kiltprotocol/augment-api": "^1.0.0"
37+
"@kiltprotocol/augment-api": "^1.0.0",
38+
"@polkadot/api": "^12.0.0",
39+
"@polkadot/keyring": "^13.0.0",
40+
"@polkadot/types": "^12.0.0",
41+
"@polkadot/util": "^13.0.0",
42+
"@polkadot/util-crypto": "^13.0.0"
3843
},
3944
"dependencies": {
4045
"@digitalbazaar/multikey-context": "^2.0.1",
4146
"@digitalbazaar/security-context": "^1.0.1",
4247
"@kiltprotocol/config": "workspace:*",
4348
"@kiltprotocol/types": "workspace:*",
44-
"@kiltprotocol/utils": "workspace:*",
45-
"@polkadot/api": "^12.0.0",
46-
"@polkadot/keyring": "^13.0.0",
47-
"@polkadot/types": "^12.0.0",
48-
"@polkadot/util": "^13.0.0",
49-
"@polkadot/util-crypto": "^13.0.0"
49+
"@kiltprotocol/utils": "workspace:*"
5050
},
5151
"peerDependenciesMeta": {
5252
"@kiltprotocol/augment-api": {
5353
"optional": true
54+
},
55+
"@polkadot/api": {
56+
"optional": true
57+
},
58+
"@polkadot/types": {
59+
"optional": true
5460
}
5561
}
5662
}

packages/did/src/Did.rpc.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
* found in the LICENSE file in the root directory of this source tree.
66
*/
77

8-
import { encodeAddress } from '@polkadot/keyring'
8+
import { encodeAddress, ethereumEncode } from '@polkadot/util-crypto'
99
import type { Option, Vec } from '@polkadot/types'
1010
import type { Codec } from '@polkadot/types/types'
11-
import { ethereumEncode } from '@polkadot/util-crypto'
1211

1312
import type {
1413
DidServiceEndpointsDidEndpoint,

packages/jsonld-suites/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
"@kiltprotocol/type-definitions": "^1.0.0",
4343
"@kiltprotocol/types": "workspace:*",
4444
"@kiltprotocol/utils": "workspace:*",
45+
"@polkadot/keyring": "^13.0.0",
46+
"@polkadot/types": "^12.0.0",
4547
"@polkadot/util": "^13.0.0",
4648
"@polkadot/util-crypto": "^13.0.0",
4749
"crypto-ld": "^6.0.0"

packages/legacy-credentials/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@
3333
"rimraf": "^3.0.2",
3434
"typescript": "^4.8.3"
3535
},
36-
"peerDependencies": {
37-
"@kiltprotocol/type-definitions": "^1.0.0"
38-
},
3936
"dependencies": {
4037
"@kiltprotocol/config": "workspace:*",
4138
"@kiltprotocol/credentials": "workspace:*",
4239
"@kiltprotocol/did": "workspace:*",
4340
"@kiltprotocol/types": "workspace:*",
44-
"@kiltprotocol/utils": "workspace:*",
41+
"@kiltprotocol/utils": "workspace:*"
42+
},
43+
"peerDependencies": {
44+
"@kiltprotocol/type-definitions": "^1.0.0",
45+
"@polkadot/keyring": "^13.0.0",
46+
"@polkadot/types": "^12.0.0",
4547
"@polkadot/util": "^13.0.0",
4648
"@polkadot/util-crypto": "^13.0.0"
4749
}

packages/sdk-js/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@
4848
"@kiltprotocol/type-definitions": "rc",
4949
"@kiltprotocol/utils": "workspace:*",
5050
"@polkadot/api": "^12.0.0",
51+
"@polkadot/keyring": "^13.0.0",
5152
"@polkadot/types": "^12.0.0",
52-
"@polkadot/util": "^13.0.0"
53+
"@polkadot/util": "^13.0.0",
54+
"@polkadot/util-crypto": "^13.0.0"
5355
},
5456
"peerDependencies": {
5557
"@kiltprotocol/augment-api": "^1.11210.0"

0 commit comments

Comments
 (0)