@did-space/core 0.5.32 → 0.5.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,8 @@ exports.GlobalSpaceOptionsSchema = validator_1.Joi.object({
13
13
  });
14
14
  exports.HashSchema = validator_1.Joi.string()
15
15
  .custom((value, helper) => {
16
- if (!(0, utils_1.isCidV1)(value)) {
16
+ // @NOTE: 不是一个 ipfs cid,且不是一个 sha256 hash,才会报错
17
+ if (!(0, utils_1.isCidV1)(value) && value.length !== 64) {
17
18
  return helper.error(`Invalid hash(${value})`);
18
19
  }
19
20
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-space/core",
3
- "version": "0.5.32",
3
+ "version": "0.5.34",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,5 +53,5 @@
53
53
  "ts-jest": "^28.0.8",
54
54
  "typescript": "^4.9.5"
55
55
  },
56
- "gitHead": "20c2365e56af81f1e51855d9dc96e939a82d6d1c"
56
+ "gitHead": "ffae2e6425635aa677c0d4eb17676a1c5345a3bb"
57
57
  }