Skip to content

Commit d0445c3

Browse files
authored
chore: release 0.33.1 (#773)
* fix: cbor-web imports do not work in esm (#772) * chore: set release version 0.33.1
1 parent e9fb6ee commit d0445c3

File tree

21 files changed

+36
-30
lines changed

21 files changed

+36
-30
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@
7070
"typedoc": "^0.22.15",
7171
"typescript": "^4.8.3"
7272
},
73-
"version": "0.33.0",
73+
"version": "0.33.1",
7474
"packageManager": "[email protected]"
7575
}

packages/asset-did/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kiltprotocol/asset-did",
3-
"version": "0.33.0",
3+
"version": "0.33.1",
44
"description": "",
55
"main": "./lib/cjs/index.js",
66
"module": "./lib/esm/index.js",

packages/augment-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kiltprotocol/augment-api",
3-
"version": "0.33.0",
3+
"version": "0.33.1",
44
"description": "",
55
"types": "./lib/index.d.ts",
66
"type": "module",

packages/chain-helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kiltprotocol/chain-helpers",
3-
"version": "0.33.0",
3+
"version": "0.33.1",
44
"description": "",
55
"main": "./lib/cjs/index.js",
66
"module": "./lib/esm/index.js",

packages/config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kiltprotocol/config",
3-
"version": "0.33.0",
3+
"version": "0.33.1",
44
"description": "",
55
"type": "commonjs",
66
"main": "./lib/index.js",

packages/core/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kiltprotocol/core",
3-
"version": "0.33.0",
3+
"version": "0.33.1",
44
"description": "",
55
"main": "./lib/cjs/index.js",
66
"module": "./lib/esm/index.js",
@@ -49,7 +49,6 @@
4949
"@polkadot/keyring": "^12.0.0",
5050
"@polkadot/types": "^10.4.0",
5151
"@polkadot/util": "^12.0.0",
52-
"@polkadot/util-crypto": "^12.0.0",
53-
"cbor-web": "^8.0.0"
52+
"@polkadot/util-crypto": "^12.0.0"
5453
}
5554
}

packages/core/src/publicCredential/PublicCredential.chain.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ import type {
2222
PublicCredentialsCredentialsCredentialEntry,
2323
} from '@kiltprotocol/augment-api'
2424

25-
import { encode as cborEncode, decode as cborDecode } from 'cbor-web'
26-
2725
import { HexString } from '@polkadot/util/types'
2826
import { ConfigService } from '@kiltprotocol/config'
2927
import { fromChain as didFromChain } from '@kiltprotocol/did'
3028
import { validateUri } from '@kiltprotocol/asset-did'
31-
import { SDKErrors } from '@kiltprotocol/utils'
29+
import { SDKErrors, cbor } from '@kiltprotocol/utils'
3230

3331
import { getIdForCredential } from './PublicCredential.js'
3432
import { flattenCalls, isBatch, retrieveExtrinsicFromBlock } from '../utils.js'
@@ -51,7 +49,7 @@ export function toChain(
5149
): EncodedPublicCredential {
5250
const { cTypeHash, claims, subject, delegationId } = publicCredential
5351

54-
const cborSerializedClaims = cborEncode(claims)
52+
const cborSerializedClaims = cbor.encode(claims)
5553

5654
return {
5755
ctypeHash: cTypeHash,
@@ -72,7 +70,7 @@ function credentialInputFromChain({
7270
const credentialSubject = subject.toUtf8()
7371
validateUri(credentialSubject)
7472
return {
75-
claims: cborDecode(claims),
73+
claims: cbor.decode(claims),
7674
cTypeHash: ctypeHash.toHex(),
7775
delegationId: authorization.unwrapOr(undefined)?.toHex() ?? null,
7876
subject: credentialSubject as AssetDidUri,

packages/did/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kiltprotocol/did",
3-
"version": "0.33.0",
3+
"version": "0.33.1",
44
"description": "",
55
"main": "./lib/cjs/index.js",
66
"module": "./lib/esm/index.js",
@@ -44,7 +44,6 @@
4444
"@polkadot/types": "^10.4.0",
4545
"@polkadot/types-codec": "^10.4.0",
4646
"@polkadot/util": "^12.0.0",
47-
"@polkadot/util-crypto": "^12.0.0",
48-
"cbor-web": "^8.0.0"
47+
"@polkadot/util-crypto": "^12.0.0"
4948
}
5049
}

packages/did/src/DidDetails/LightDidDetails.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* found in the LICENSE file in the root directory of this source tree.
66
*/
77

8-
import { decode as cborDecode, encode as cborEncode } from 'cbor-web'
98
import {
109
base58Decode,
1110
base58Encode,
@@ -22,7 +21,7 @@ import type {
2221
} from '@kiltprotocol/types'
2322
import { encryptionKeyTypes } from '@kiltprotocol/types'
2423

25-
import { SDKErrors, ss58Format } from '@kiltprotocol/utils'
24+
import { SDKErrors, ss58Format, cbor } from '@kiltprotocol/utils'
2625

2726
import { getAddressByKey, parse } from '../Did.utils.js'
2827
import { resourceIdToChain, validateService } from '../Did.chain.js'
@@ -147,7 +146,7 @@ function serializeAdditionalLightDidDetails({
147146
}
148147

149148
const serializationVersion = 0x0
150-
const serialized = cborEncode(objectToSerialize)
149+
const serialized = cbor.encode(objectToSerialize)
151150
return base58Encode([serializationVersion, ...serialized], true)
152151
}
153152

@@ -166,7 +165,7 @@ function deserializeAdditionalLightDidDetails(
166165
if (serializationVersion !== 0x0) {
167166
throw new SDKErrors.DidError('Serialization algorithm not supported')
168167
}
169-
const deserialized: SerializableStructure = cborDecode(serialized)
168+
const deserialized: SerializableStructure = cbor.decode(serialized)
170169

171170
const keyAgreement = deserialized[KEY_AGREEMENT_MAP_KEY]
172171
return {

packages/did/src/cbor-web.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)