@arcblock/nft 1.28.5 → 1.28.7

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.
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  ```sh
18
18
  npm install @arcblock/nft
19
19
  // or
20
- pnpm install @arcblock/nft
20
+ bun install @arcblock/nft
21
21
  ```
22
22
 
23
23
  ## Usage
package/lib/factory.js CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable no-underscore-dangle */
2
- /* eslint-disable no-console */
3
1
  const Client = require('@ocap/client');
4
2
  const { isValid } = require('@ocap/wallet');
5
3
  const { toBase58 } = require('@ocap/util');
@@ -76,10 +74,6 @@ class NFTFactory {
76
74
  }
77
75
  });
78
76
 
79
- if (!(data.recipient instanceof NFTRecipient)) {
80
- throw new Error(`Invalid recipient field when creating ${type} asset`);
81
- }
82
-
83
77
  const {
84
78
  name,
85
79
  description,
@@ -92,6 +86,10 @@ class NFTFactory {
92
86
  issuanceDate,
93
87
  } = data;
94
88
 
89
+ if (!(recipient instanceof NFTRecipient)) {
90
+ throw new Error(`Invalid recipient field when creating ${type} asset`);
91
+ }
92
+
95
93
  const vc = await create({
96
94
  type: [type, 'NFTTicket', 'VerifiableCredential'].filter(Boolean),
97
95
  issuer: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcblock/nft",
3
3
  "description": "Utility to create standard asset on forge powered blockchain",
4
- "version": "1.28.5",
4
+ "version": "1.28.7",
5
5
  "author": {
6
6
  "name": "wangshijun",
7
7
  "email": "shijun@arcblock.io",
@@ -18,23 +18,22 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
+ "@arcblock/did-util": "1.28.7",
22
+ "@arcblock/vc": "1.28.7",
23
+ "@ocap/client": "1.28.7",
24
+ "@ocap/tx-protocols": "1.28.7",
25
+ "@ocap/tx-util": "1.28.7",
26
+ "@ocap/util": "1.28.7",
27
+ "@ocap/wallet": "1.28.7",
21
28
  "debug": "^4.3.6",
22
29
  "json-stable-stringify": "^1.0.1",
23
30
  "lodash": "^4.17.21",
24
- "pako": "^1.0.11",
25
- "@arcblock/did-util": "1.28.5",
26
- "@ocap/client": "1.28.5",
27
- "@ocap/tx-protocols": "1.28.5",
28
- "@ocap/tx-util": "1.28.5",
29
- "@ocap/util": "1.28.5",
30
- "@ocap/wallet": "1.28.5",
31
- "@arcblock/vc": "1.28.5"
31
+ "pako": "^1.0.11"
32
32
  },
33
33
  "devDependencies": {
34
- "jest": "^29.7.0",
34
+ "@ocap/e2e-test": "1.28.7",
35
35
  "remark-cli": "^10.0.1",
36
- "remark-preset-github": "^4.0.4",
37
- "@ocap/e2e-test": "1.28.5"
36
+ "remark-preset-github": "^4.0.4"
38
37
  },
39
38
  "remarkConfig": {
40
39
  "plugins": [
@@ -62,16 +61,16 @@
62
61
  "type": "git",
63
62
  "url": "https://github.com/ArcBlock/blockchain/tree/master/asset/nft"
64
63
  },
65
- "gitHead": "87990c8b5e215107fc587c1ced0d6b3e2cd2483e",
66
64
  "scripts": {
67
- "lint": "eslint lib tests",
68
- "lint:fix": "eslint --fix lib tests",
69
- "docs": "pnpm run gen-dts && pnpm run gen-docs && pnpm run cleanup-docs && pnpm run format-docs",
65
+ "lint": "biome check",
66
+ "lint:fix": "biome check --write",
67
+ "docs": "bun run gen-dts && bun run gen-docs && bun run cleanup-docs && bun run format-docs",
70
68
  "cleanup-docs": "node ../../scripts/cleanup-docs.js docs/README.md $npm_package_name",
71
69
  "gen-dts": "j2d lib/index.js",
72
70
  "gen-docs": "jsdoc2md lib/index.js > docs/README.md",
73
71
  "format-docs": "remark . -o",
74
- "test": "jest --forceExit --detectOpenHandles",
72
+ "test": "bun test",
75
73
  "coverage": "npm run test -- --coverage"
76
- }
77
- }
74
+ },
75
+ "gitHead": "87990c8b5e215107fc587c1ced0d6b3e2cd2483e"
76
+ }