@ocap/config 1.27.2 → 1.27.4
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/lib/index.js +5 -1
- package/lib/schema.js +6 -0
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -52,7 +52,6 @@ const genTokenItx = (config) => {
|
|
|
52
52
|
'symbol',
|
|
53
53
|
'unit',
|
|
54
54
|
'decimal',
|
|
55
|
-
'icon',
|
|
56
55
|
'totalSupply',
|
|
57
56
|
'initialSupply',
|
|
58
57
|
'foreignToken',
|
|
@@ -69,6 +68,11 @@ const genTokenItx = (config) => {
|
|
|
69
68
|
itx.address = toTokenAddress(itx);
|
|
70
69
|
}
|
|
71
70
|
|
|
71
|
+
// These properties are mutable, so they cannot included in toTokenAddress calculation
|
|
72
|
+
itx.metadata = config.token.metadata;
|
|
73
|
+
itx.website = config.token.website;
|
|
74
|
+
itx.icon = config.token.icon;
|
|
75
|
+
|
|
72
76
|
return itx;
|
|
73
77
|
};
|
|
74
78
|
|
package/lib/schema.js
CHANGED
|
@@ -62,6 +62,12 @@ const configSchema = Joi.object({
|
|
|
62
62
|
initialSupply: Joi.number().positive().required(),
|
|
63
63
|
totalSupply: Joi.number().positive().required(),
|
|
64
64
|
inflationRate: Joi.number().required(),
|
|
65
|
+
website: Joi.string()
|
|
66
|
+
.uri({ scheme: ['https'], allowRelative: false })
|
|
67
|
+
.max(256)
|
|
68
|
+
.optional()
|
|
69
|
+
.allow(null, ''),
|
|
70
|
+
metadata: Joi.any().optional().allow(null),
|
|
65
71
|
foreignToken: Joi.object({
|
|
66
72
|
type: Joi.string().min(1).max(32).required(),
|
|
67
73
|
contractAddress: Joi.string().required(),
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.27.
|
|
6
|
+
"version": "1.27.4",
|
|
7
7
|
"description": "OCAP config parsing/validation and default",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.21",
|
|
23
|
-
"@arcblock/did": "1.27.
|
|
24
|
-
"@arcblock/did-util": "1.27.
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
23
|
+
"@arcblock/did": "1.27.4",
|
|
24
|
+
"@arcblock/did-util": "1.27.4",
|
|
25
|
+
"@ocap/util": "1.27.4",
|
|
26
|
+
"@arcblock/validator": "1.27.4"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"lint": "eslint tests lib",
|