@arcblock/nft 1.29.27 → 1.30.1
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/esm/factory.mjs +1 -1
- package/lib/factory.cjs +3 -3
- package/package.json +9 -11
package/esm/factory.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import Client from "@ocap/client";
|
|
|
7
7
|
import { toBase58 } from "@ocap/util";
|
|
8
8
|
import { isValid } from "@ocap/wallet";
|
|
9
9
|
import Debug from "debug";
|
|
10
|
-
import stringify from "json-stable-stringify";
|
|
10
|
+
import stringify from "fast-json-stable-stringify";
|
|
11
11
|
import cloneDeep from "lodash/cloneDeep.js";
|
|
12
12
|
import get from "lodash/get.js";
|
|
13
13
|
import isDate from "lodash/isDate.js";
|
package/lib/factory.cjs
CHANGED
|
@@ -11,8 +11,8 @@ let _ocap_util = require("@ocap/util");
|
|
|
11
11
|
let _ocap_wallet = require("@ocap/wallet");
|
|
12
12
|
let debug = require("debug");
|
|
13
13
|
debug = require_rolldown_runtime.__toESM(debug);
|
|
14
|
-
let
|
|
15
|
-
|
|
14
|
+
let fast_json_stable_stringify = require("fast-json-stable-stringify");
|
|
15
|
+
fast_json_stable_stringify = require_rolldown_runtime.__toESM(fast_json_stable_stringify);
|
|
16
16
|
let lodash_cloneDeep = require("lodash/cloneDeep");
|
|
17
17
|
lodash_cloneDeep = require_rolldown_runtime.__toESM(lodash_cloneDeep);
|
|
18
18
|
let lodash_get = require("lodash/get");
|
|
@@ -233,7 +233,7 @@ var NFTFactory = class {
|
|
|
233
233
|
return this.createSignedAsset(vc, attributes);
|
|
234
234
|
}
|
|
235
235
|
async createSignedAsset(payload, attributes) {
|
|
236
|
-
payload.signature = (0, _ocap_util.toBase58)(await this.wallet.sign((0,
|
|
236
|
+
payload.signature = (0, _ocap_util.toBase58)(await this.wallet.sign((0, fast_json_stable_stringify.default)(payload)));
|
|
237
237
|
const asset = {
|
|
238
238
|
moniker: (0, lodash_get.default)(payload, "data.name") || (0, lodash_get.default)(payload, "credentialSubject.name") || "signed_asset",
|
|
239
239
|
readonly: false,
|
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.
|
|
4
|
+
"version": "1.30.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -43,22 +43,20 @@
|
|
|
43
43
|
"esm"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@arcblock/did-util": "1.
|
|
47
|
-
"@arcblock/vc": "1.
|
|
48
|
-
"@ocap/client": "1.
|
|
49
|
-
"@ocap/tx-protocols": "1.
|
|
50
|
-
"@ocap/tx-util": "1.
|
|
51
|
-
"@ocap/util": "1.
|
|
52
|
-
"@ocap/wallet": "1.
|
|
46
|
+
"@arcblock/did-util": "1.30.1",
|
|
47
|
+
"@arcblock/vc": "1.30.1",
|
|
48
|
+
"@ocap/client": "1.30.1",
|
|
49
|
+
"@ocap/tx-protocols": "1.30.1",
|
|
50
|
+
"@ocap/tx-util": "1.30.1",
|
|
51
|
+
"@ocap/util": "1.30.1",
|
|
52
|
+
"@ocap/wallet": "1.30.1",
|
|
53
53
|
"debug": "^4.4.3",
|
|
54
|
-
"json-stable-stringify": "^1.0
|
|
54
|
+
"fast-json-stable-stringify": "^2.1.0",
|
|
55
55
|
"lodash": "^4.17.23",
|
|
56
56
|
"pako": "^1.0.11"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@ocap/e2e-test": "1.29.27",
|
|
60
59
|
"@types/debug": "^4.1.12",
|
|
61
|
-
"@types/json-stable-stringify": "^1.0.36",
|
|
62
60
|
"@types/lodash": "^4.17.13",
|
|
63
61
|
"remark-cli": "^10.0.1",
|
|
64
62
|
"remark-preset-github": "^4.0.4"
|