@ocap/tx-protocols 1.18.33 → 1.18.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.
@@ -31,10 +31,8 @@ runner.use(pipes.VerifyMultiSig(0));
31
31
  const schema = Joi.object({
32
32
  factory: Joi.DID().prefix().role('ROLE_FACTORY').required(),
33
33
  address: Joi.DID().prefix().role('ROLE_ASSET').required(),
34
- assetsList: Joi.array()
35
- .items(Joi.alternatives().try(Joi.DID().prefix().role('ROLE_ASSET'), Joi.DID().prefix().role('ROLE_FACTORY')))
36
- .default([]),
37
- variablesList: Joi.array().items(schemas.variableInput).min(1).required(),
34
+ assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
35
+ variablesList: Joi.array().items(schemas.variableInput).optional().default([]),
38
36
  issuer: schemas.nftIssuer.required(),
39
37
  data: Joi.any().optional(),
40
38
  }).options({ stripUnknown: true, noDefaults: false });
@@ -34,8 +34,8 @@ const schema = Joi.object({
34
34
  factory: Joi.DID().prefix().role('ROLE_FACTORY').required(),
35
35
  address: Joi.DID().prefix().role('ROLE_ASSET').required(),
36
36
  inputsList: schemas.multiInput.min(1).required(),
37
- owner: Joi.DID().prefix().required(),
38
- variablesList: Joi.array().items(schemas.variableInput).min(1).required(),
37
+ owner: schemas.tokenHolder.required(),
38
+ variablesList: Joi.array().items(schemas.variableInput).optional().default([]),
39
39
  issuer: schemas.nftIssuer.required(),
40
40
  data: Joi.any().optional(),
41
41
  }).options({ stripUnknown: true, noDefaults: false });
@@ -23,11 +23,9 @@ runner.use(pipes.VerifyMultiSig(0));
23
23
  const schema = Joi.object({
24
24
  factory: Joi.DID().prefix().role('ROLE_FACTORY').required(),
25
25
  address: Joi.DID().prefix().role('ROLE_ASSET').required(),
26
- assetsList: Joi.array()
27
- .items(Joi.alternatives().try(Joi.DID().prefix().role('ROLE_ASSET'), Joi.DID().prefix().role('ROLE_FACTORY')))
28
- .default([]),
29
- variablesList: Joi.array().items(schemas.variableInput).min(1).required(),
30
- owner: Joi.DID().prefix().required(),
26
+ assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
27
+ variablesList: Joi.array().items(schemas.variableInput).optional().default([]),
28
+ owner: schemas.tokenHolder.required(),
31
29
  data: Joi.any().optional(),
32
30
  }).options({ stripUnknown: true, noDefaults: false });
33
31
  runner.use(({ itx }, next) => {
@@ -24,7 +24,7 @@ const exchangeInfoSchema = Joi.object({
24
24
  assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
25
25
  });
26
26
  const schema = Joi.object({
27
- to: Joi.DID().prefix().role('ROLE_ACCOUNT').required(),
27
+ to: schemas.tokenHolder.required(),
28
28
  sender: exchangeInfoSchema.required(),
29
29
  receiver: exchangeInfoSchema.required(),
30
30
  data: Joi.any().optional(),
@@ -20,7 +20,7 @@ runner.use(pipes.VerifyMultiSig(0));
20
20
 
21
21
  // 1. verify itx
22
22
  const schema = Joi.object({
23
- to: Joi.DID().prefix().role('ROLE_ACCOUNT').required(),
23
+ to: schemas.tokenHolder.required(),
24
24
  value: Joi.any().optional(),
25
25
  tokensList: Joi.array().items(schemas.tokenInput).default([]),
26
26
  assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.18.33",
6
+ "version": "1.18.34",
7
7
  "description": "Predefined tx pipeline sets to execute certain type of transactions",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -21,18 +21,18 @@
21
21
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@arcblock/did": "1.18.33",
25
- "@arcblock/did-util": "1.18.33",
26
- "@arcblock/jwt": "1.18.33",
27
- "@arcblock/validator": "1.18.33",
28
- "@ocap/asset": "1.18.33",
29
- "@ocap/mcrypto": "1.18.33",
30
- "@ocap/merkle-tree": "1.18.33",
31
- "@ocap/message": "1.18.33",
32
- "@ocap/state": "1.18.33",
33
- "@ocap/tx-pipeline": "1.18.33",
34
- "@ocap/util": "1.18.33",
35
- "@ocap/wallet": "1.18.33",
24
+ "@arcblock/did": "1.18.34",
25
+ "@arcblock/did-util": "1.18.34",
26
+ "@arcblock/jwt": "1.18.34",
27
+ "@arcblock/validator": "1.18.34",
28
+ "@ocap/asset": "1.18.34",
29
+ "@ocap/mcrypto": "1.18.34",
30
+ "@ocap/merkle-tree": "1.18.34",
31
+ "@ocap/message": "1.18.34",
32
+ "@ocap/state": "1.18.34",
33
+ "@ocap/tx-pipeline": "1.18.34",
34
+ "@ocap/util": "1.18.34",
35
+ "@ocap/wallet": "1.18.34",
36
36
  "debug": "^4.3.4",
37
37
  "deep-diff": "^1.0.2",
38
38
  "empty-value": "^1.0.1",
@@ -47,5 +47,5 @@
47
47
  "jest": "^27.5.1",
48
48
  "start-server-and-test": "^1.14.0"
49
49
  },
50
- "gitHead": "0d03089c6651d92a3451e9bbbc865c18c2f5d8ad"
50
+ "gitHead": "c12d3cbf9617d861d83c08726d9e0d55fdf9a459"
51
51
  }