@ocap/tx-protocols 1.19.16 → 1.19.17
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/protocols/account/delegate.js +20 -13
- package/lib/protocols/account/migrate.js +1 -1
- package/lib/protocols/account/revoke-delegate.js +1 -1
- package/lib/protocols/asset/acquire-v2.js +2 -2
- package/lib/protocols/asset/acquire-v3.js +2 -2
- package/lib/protocols/asset/consume.js +1 -1
- package/lib/protocols/asset/mint.js +2 -2
- package/lib/protocols/asset/update.js +3 -3
- package/lib/protocols/governance/claim-stake.js +1 -1
- package/lib/protocols/governance/return-stake.js +1 -1
- package/lib/protocols/governance/revoke-stake.js +1 -1
- package/lib/protocols/governance/slash-stake.js +1 -1
- package/lib/protocols/governance/stake.js +2 -2
- package/lib/protocols/rollup/claim-reward.js +1 -1
- package/lib/protocols/rollup/close.js +1 -1
- package/lib/protocols/rollup/create-block.js +2 -2
- package/lib/protocols/rollup/join.js +1 -1
- package/lib/protocols/rollup/leave.js +1 -1
- package/lib/protocols/rollup/migrate.js +1 -1
- package/lib/protocols/rollup/pause.js +1 -1
- package/lib/protocols/rollup/resume.js +1 -1
- package/lib/protocols/rollup/update.js +1 -1
- package/lib/protocols/token/create.js +3 -3
- package/lib/protocols/token/deposit-v2.js +1 -1
- package/lib/protocols/token/withdraw-v2.js +2 -2
- package/lib/protocols/trade/exchange-v2.js +2 -2
- package/lib/protocols/trade/transfer-v2.js +2 -2
- package/lib/protocols/trade/transfer-v3.js +1 -1
- package/package.json +14 -14
|
@@ -21,25 +21,31 @@ runner.use(pipes.VerifyMultiSig(0));
|
|
|
21
21
|
|
|
22
22
|
const rateLimit = Joi.object({
|
|
23
23
|
interval: Joi.number().integer().greater(0).required(),
|
|
24
|
-
anchor: Joi.number().integer().min(0).optional().default(0),
|
|
24
|
+
anchor: Joi.number().integer().min(0).optional().allow(null).default(0),
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const tokenLimit = Joi.object({
|
|
28
28
|
address: Joi.DID().prefix().role('ROLE_TOKEN').required(),
|
|
29
|
-
toList: Joi.array().items(Joi.DID().prefix()).max(32).unique().optional().default([]),
|
|
30
|
-
txCount: Joi.number().integer().min(0).empty('').optional().default(0),
|
|
31
|
-
txAllowance: Joi.BN().optional().default('0'),
|
|
32
|
-
totalAllowance: Joi.BN().optional().default('0'),
|
|
33
|
-
validUntil: Joi.number().integer().min(0).empty('').optional().default(0),
|
|
34
|
-
rate: rateLimit.optional(),
|
|
29
|
+
toList: Joi.array().items(Joi.DID().prefix()).max(32).unique().optional().allow(null).default([]),
|
|
30
|
+
txCount: Joi.number().integer().min(0).empty('').optional().allow(null).default(0),
|
|
31
|
+
txAllowance: Joi.BN().optional().allow(null).default('0'),
|
|
32
|
+
totalAllowance: Joi.BN().optional().allow(null).default('0'),
|
|
33
|
+
validUntil: Joi.number().integer().min(0).empty('').optional().allow(null).default(0),
|
|
34
|
+
rate: rateLimit.optional().allow(null),
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
const assetLimit = Joi.object({
|
|
38
|
-
address: Joi.array()
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
address: Joi.array()
|
|
39
|
+
.items(Joi.DID().prefix().role('ROLE_ASSET'))
|
|
40
|
+
.unique()
|
|
41
|
+
.max(1024)
|
|
42
|
+
.optional()
|
|
43
|
+
.allow(null)
|
|
44
|
+
.default([]),
|
|
45
|
+
toList: Joi.array().items(Joi.DID().prefix()).unique().max(32).optional().allow(null).default([]),
|
|
46
|
+
txCount: Joi.number().integer().min(0).empty('').optional().allow(null).default(0),
|
|
47
|
+
validUntil: Joi.number().integer().min(0).empty('').optional().allow(null).default(0),
|
|
48
|
+
rate: rateLimit.optional().allow(null),
|
|
43
49
|
});
|
|
44
50
|
|
|
45
51
|
// verify itx
|
|
@@ -58,13 +64,14 @@ const schema = Joi.object({
|
|
|
58
64
|
assetsList: Joi.array().items(assetLimit).max(32),
|
|
59
65
|
})
|
|
60
66
|
.optional()
|
|
67
|
+
.allow(null)
|
|
61
68
|
.default({ tokensList: [], assetsList: [] }),
|
|
62
69
|
})
|
|
63
70
|
)
|
|
64
71
|
.unique((a, b) => a.typeUrl === b.typeUrl)
|
|
65
72
|
.min(1)
|
|
66
73
|
.required(),
|
|
67
|
-
data: Joi.any().optional(),
|
|
74
|
+
data: Joi.any().optional().allow(null),
|
|
68
75
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
69
76
|
runner.use((context, next) => {
|
|
70
77
|
const { error, value } = schema.validate(context.itx);
|
|
@@ -24,7 +24,7 @@ runner.use(pipes.VerifyMultiSig(0));
|
|
|
24
24
|
const schema = Joi.object({
|
|
25
25
|
address: Joi.DID().prefix().required(),
|
|
26
26
|
pk: Joi.any().required(),
|
|
27
|
-
data: Joi.any().optional(),
|
|
27
|
+
data: Joi.any().optional().allow(null),
|
|
28
28
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
29
29
|
runner.use(({ itx }, next) => {
|
|
30
30
|
const { error } = schema.validate(itx);
|
|
@@ -22,7 +22,7 @@ const schema = Joi.object({
|
|
|
22
22
|
address: Joi.DID().prefix().role('ROLE_DELEGATION').required(),
|
|
23
23
|
to: Joi.DID().prefix().required(),
|
|
24
24
|
typeUrlsList: Joi.array().items(Joi.string().required()).min(1).required(),
|
|
25
|
-
data: Joi.any().optional(),
|
|
25
|
+
data: Joi.any().optional().allow(null),
|
|
26
26
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
27
27
|
runner.use(({ itx }, next) => {
|
|
28
28
|
const { error } = schema.validate(itx);
|
|
@@ -32,9 +32,9 @@ 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
34
|
assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
|
|
35
|
-
variablesList: Joi.array().items(schemas.variableInput).optional().default([]),
|
|
35
|
+
variablesList: Joi.array().items(schemas.variableInput).optional().allow(null).default([]),
|
|
36
36
|
issuer: schemas.nftIssuer.required(),
|
|
37
|
-
data: Joi.any().optional(),
|
|
37
|
+
data: Joi.any().optional().allow(null),
|
|
38
38
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
39
39
|
runner.use(({ itx }, next) => {
|
|
40
40
|
const { error } = schema.validate(itx);
|
|
@@ -35,9 +35,9 @@ const schema = Joi.object({
|
|
|
35
35
|
address: Joi.DID().prefix().role('ROLE_ASSET').required(),
|
|
36
36
|
inputsList: schemas.multiInput.min(1).required(),
|
|
37
37
|
owner: schemas.tokenHolder.required(),
|
|
38
|
-
variablesList: Joi.array().items(schemas.variableInput).optional().default([]),
|
|
38
|
+
variablesList: Joi.array().items(schemas.variableInput).optional().allow(null).default([]),
|
|
39
39
|
issuer: schemas.nftIssuer.required(),
|
|
40
|
-
data: Joi.any().optional(),
|
|
40
|
+
data: Joi.any().optional().allow(null),
|
|
41
41
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
42
42
|
runner.use(({ itx }, next) => {
|
|
43
43
|
const { error } = schema.validate(itx);
|
|
@@ -14,7 +14,7 @@ const runner = new Runner();
|
|
|
14
14
|
// Verify itx
|
|
15
15
|
const schema = Joi.object({
|
|
16
16
|
address: Joi.DID().prefix().role('ROLE_ASSET').required(),
|
|
17
|
-
data: Joi.any().optional(),
|
|
17
|
+
data: Joi.any().optional().allow(null),
|
|
18
18
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
19
19
|
runner.use((context, next) => {
|
|
20
20
|
const { itx } = context;
|
|
@@ -24,9 +24,9 @@ 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
26
|
assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
|
|
27
|
-
variablesList: Joi.array().items(schemas.variableInput).optional().default([]),
|
|
27
|
+
variablesList: Joi.array().items(schemas.variableInput).optional().allow(null).default([]),
|
|
28
28
|
owner: schemas.tokenHolder.required(),
|
|
29
|
-
data: Joi.any().optional(),
|
|
29
|
+
data: Joi.any().optional().allow(null),
|
|
30
30
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
31
31
|
runner.use(({ itx }, next) => {
|
|
32
32
|
const { error } = schema.validate(itx);
|
|
@@ -19,9 +19,9 @@ runner.use(pipes.VerifyMultiSig(0));
|
|
|
19
19
|
// Verify itx
|
|
20
20
|
const schema = Joi.object({
|
|
21
21
|
address: Joi.DID().prefix().role('ROLE_ASSET').required(),
|
|
22
|
-
moniker: Joi.string().min(2).max(255).optional().allow(''),
|
|
23
|
-
consumed: Joi.boolean().optional().default(false),
|
|
24
|
-
data: Joi.any().optional(),
|
|
22
|
+
moniker: Joi.string().min(2).max(255).optional().allow(null).allow(''),
|
|
23
|
+
consumed: Joi.boolean().optional().allow(null).default(false),
|
|
24
|
+
data: Joi.any().optional().allow(null),
|
|
25
25
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
26
26
|
runner.use((context, next) => {
|
|
27
27
|
const { itx } = context;
|
|
@@ -22,7 +22,7 @@ const schema = Joi.object({
|
|
|
22
22
|
evidence: Joi.object({
|
|
23
23
|
hash: Joi.string().regex(patterns.txHash).required(),
|
|
24
24
|
}).required(),
|
|
25
|
-
data: Joi.any().optional(),
|
|
25
|
+
data: Joi.any().optional().allow(null),
|
|
26
26
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
27
27
|
runner.use(({ itx }, next) => {
|
|
28
28
|
const { error } = schema.validate(itx);
|
|
@@ -22,7 +22,7 @@ const schema = Joi.object({
|
|
|
22
22
|
address: Joi.DID().prefix().role('ROLE_STAKE').required(),
|
|
23
23
|
message: Joi.string().trim().min(1).max(256).required(),
|
|
24
24
|
outputsList: schemas.multiInput.min(1).required(),
|
|
25
|
-
data: Joi.any().optional(),
|
|
25
|
+
data: Joi.any().optional().allow(null),
|
|
26
26
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
27
27
|
runner.use(({ itx }, next) => {
|
|
28
28
|
const { error } = schema.validate(itx);
|
|
@@ -21,7 +21,7 @@ runner.use(pipes.VerifyMultiSig(0));
|
|
|
21
21
|
const schema = Joi.object({
|
|
22
22
|
address: Joi.DID().prefix().role('ROLE_STAKE').required(),
|
|
23
23
|
outputsList: schemas.multiInput.min(1).required(),
|
|
24
|
-
data: Joi.any().optional(),
|
|
24
|
+
data: Joi.any().optional().allow(null),
|
|
25
25
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
26
26
|
runner.use(({ itx }, next) => {
|
|
27
27
|
const { error } = schema.validate(itx);
|
|
@@ -22,7 +22,7 @@ const schema = Joi.object({
|
|
|
22
22
|
address: Joi.DID().prefix().role('ROLE_STAKE').required(),
|
|
23
23
|
message: Joi.string().trim().min(1).max(256).required(),
|
|
24
24
|
outputsList: schemas.multiInput.min(1).required(),
|
|
25
|
-
data: Joi.any().optional(),
|
|
25
|
+
data: Joi.any().optional().allow(null),
|
|
26
26
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
27
27
|
runner.use(({ itx }, next) => {
|
|
28
28
|
const { error } = schema.validate(itx);
|
|
@@ -29,8 +29,8 @@ const schema = Joi.object({
|
|
|
29
29
|
inputsList: schemas.multiInput.min(1).required(),
|
|
30
30
|
message: Joi.string().trim().min(1).max(256).required(),
|
|
31
31
|
revokeWaitingPeriod: Joi.number().integer().min(0).default(0),
|
|
32
|
-
data: Joi.any().optional(),
|
|
33
|
-
nonce: Joi.string().trim().min(1).max(256).allow('').optional(),
|
|
32
|
+
data: Joi.any().optional().allow(null),
|
|
33
|
+
nonce: Joi.string().trim().min(1).max(256).allow('').optional().allow(null),
|
|
34
34
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
35
35
|
runner.use(({ itx }, next) => {
|
|
36
36
|
const { error } = schema.validate(itx);
|
|
@@ -29,7 +29,7 @@ const schema = Joi.object({
|
|
|
29
29
|
hash: Joi.string().regex(patterns.txHash).required(),
|
|
30
30
|
}).required(),
|
|
31
31
|
publisher: Joi.DID().prefix().wallet('ethereum').required(),
|
|
32
|
-
data: Joi.any().optional(),
|
|
32
|
+
data: Joi.any().optional().allow(null),
|
|
33
33
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
34
34
|
runner.use((context, next) => {
|
|
35
35
|
const { tx, itx } = context;
|
|
@@ -20,7 +20,7 @@ const schema = Joi.object({
|
|
|
20
20
|
address: Joi.DID().prefix().wallet('ethereum').required(),
|
|
21
21
|
value: Joi.BN().positive().required(),
|
|
22
22
|
}),
|
|
23
|
-
data: Joi.any().optional(),
|
|
23
|
+
data: Joi.any().optional().allow(null),
|
|
24
24
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
25
25
|
runner.use(({ itx }, next) => {
|
|
26
26
|
const { error } = schema.validate(itx);
|
|
@@ -30,7 +30,7 @@ const schema = Joi.object({
|
|
|
30
30
|
merkleRoot: Joi.string().regex(patterns.txHash).required(),
|
|
31
31
|
previousHash: Joi.string().when('height', {
|
|
32
32
|
is: 1,
|
|
33
|
-
then: Joi.string().optional().allow(''),
|
|
33
|
+
then: Joi.string().optional().allow(null).allow(''),
|
|
34
34
|
otherwise: Joi.string().regex(patterns.txHash).required(),
|
|
35
35
|
}),
|
|
36
36
|
txsHash: Joi.string().regex(patterns.txHash).required(),
|
|
@@ -40,7 +40,7 @@ const schema = Joi.object({
|
|
|
40
40
|
rollup: Joi.DID().prefix().role('ROLE_ROLLUP').required(),
|
|
41
41
|
minReward: Joi.BN().min(0).required(),
|
|
42
42
|
governance: Joi.boolean().default(false),
|
|
43
|
-
data: Joi.any().optional(),
|
|
43
|
+
data: Joi.any().optional().allow(null),
|
|
44
44
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
45
45
|
|
|
46
46
|
runner.use((context, next) => {
|
|
@@ -30,7 +30,7 @@ const schema = Joi.object({
|
|
|
30
30
|
hash: Joi.string().regex(patterns.txHash).required(),
|
|
31
31
|
}).required(),
|
|
32
32
|
signaturesList: schemas.multiSig.min(1).required(),
|
|
33
|
-
data: Joi.any().optional(),
|
|
33
|
+
data: Joi.any().optional().allow(null),
|
|
34
34
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
35
35
|
runner.use(({ itx }, next) => {
|
|
36
36
|
const { error } = schema.validate(itx);
|
|
@@ -25,7 +25,7 @@ const schema = Joi.object({
|
|
|
25
25
|
hash: Joi.string().regex(patterns.txHash).required(),
|
|
26
26
|
}).required(),
|
|
27
27
|
signaturesList: schemas.multiSig.min(1).required(),
|
|
28
|
-
data: Joi.any().optional(),
|
|
28
|
+
data: Joi.any().optional().allow(null),
|
|
29
29
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
30
30
|
runner.use(({ itx }, next) => {
|
|
31
31
|
const { error } = schema.validate(itx);
|
|
@@ -17,7 +17,7 @@ const schema = Joi.object({
|
|
|
17
17
|
to: Joi.DID().prefix().wallet('ethereum').required(),
|
|
18
18
|
type: Joi.string().trim().valid('vault', 'contract').required(),
|
|
19
19
|
message: Joi.string().trim().min(1).max(512).required(),
|
|
20
|
-
data: Joi.any().optional(),
|
|
20
|
+
data: Joi.any().optional().allow(null),
|
|
21
21
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
22
22
|
runner.use(({ itx }, next) => {
|
|
23
23
|
const { error } = schema.validate(itx);
|
|
@@ -14,7 +14,7 @@ const runner = new Runner();
|
|
|
14
14
|
// 1. verify itx
|
|
15
15
|
const schema = Joi.object({
|
|
16
16
|
rollup: Joi.DID().prefix().role('ROLE_ROLLUP').required(),
|
|
17
|
-
data: Joi.any().optional(),
|
|
17
|
+
data: Joi.any().optional().allow(null),
|
|
18
18
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
19
19
|
runner.use(({ itx }, next) => {
|
|
20
20
|
const { error } = schema.validate(itx);
|
|
@@ -14,7 +14,7 @@ const runner = new Runner();
|
|
|
14
14
|
// 1. verify itx
|
|
15
15
|
const schema = Joi.object({
|
|
16
16
|
rollup: Joi.DID().prefix().role('ROLE_ROLLUP').required(),
|
|
17
|
-
data: Joi.any().optional(),
|
|
17
|
+
data: Joi.any().optional().allow(null),
|
|
18
18
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
19
19
|
runner.use(({ itx }, next) => {
|
|
20
20
|
const { error } = schema.validate(itx);
|
|
@@ -45,7 +45,7 @@ const schema = Joi.object({
|
|
|
45
45
|
minWithdrawFee: Joi.BN().positive().required(),
|
|
46
46
|
maxWithdrawFee: Joi.BN().greater(Joi.ref('minWithdrawFee')).required(),
|
|
47
47
|
|
|
48
|
-
data: Joi.any().optional(),
|
|
48
|
+
data: Joi.any().optional().allow(null),
|
|
49
49
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
50
50
|
runner.use(({ itx }, next) => {
|
|
51
51
|
const { error } = schema.validate(itx);
|
|
@@ -27,11 +27,11 @@ const schema = Joi.object({
|
|
|
27
27
|
symbol: Joi.string().min(2).max(6).uppercase().required(),
|
|
28
28
|
unit: Joi.string().min(1).max(6).lowercase().required(),
|
|
29
29
|
decimal: Joi.number().min(6).max(18).required(),
|
|
30
|
-
icon: Joi.string().optional().valid(''),
|
|
30
|
+
icon: Joi.string().optional().allow(null).valid(''),
|
|
31
31
|
totalSupply: Joi.BN().greater(0).max(MAX_TOTAL_SUPPLY).required(),
|
|
32
32
|
initialSupply: Joi.BN().greater(0).max(Joi.ref('totalSupply')).required(),
|
|
33
|
-
foreignToken: schemas.foreignToken.optional().default(null),
|
|
34
|
-
data: Joi.any().optional(),
|
|
33
|
+
foreignToken: schemas.foreignToken.optional().allow(null).default(null),
|
|
34
|
+
data: Joi.any().optional().allow(null),
|
|
35
35
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
36
36
|
|
|
37
37
|
// 1. verify itx
|
|
@@ -26,7 +26,7 @@ const schema = Joi.object({
|
|
|
26
26
|
}).required(),
|
|
27
27
|
rollup: Joi.DID().prefix().role('ROLE_ROLLUP').required(),
|
|
28
28
|
actualFee: Joi.BN().min(0).required(),
|
|
29
|
-
data: Joi.any().optional(),
|
|
29
|
+
data: Joi.any().optional().allow(null),
|
|
30
30
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
31
31
|
|
|
32
32
|
const runner = new Runner();
|
|
@@ -22,10 +22,10 @@ const schema = Joi.object({
|
|
|
22
22
|
token: schemas.tokenInput.required(),
|
|
23
23
|
to: Joi.DID().prefix().wallet('ethereum').required(),
|
|
24
24
|
rollup: Joi.DID().prefix().role('ROLE_ROLLUP').required(),
|
|
25
|
-
proposer: Joi.DID().prefix().wallet('ethereum').optional().allow('').default(''),
|
|
25
|
+
proposer: Joi.DID().prefix().wallet('ethereum').optional().allow(null).allow('').default(''),
|
|
26
26
|
actualFee: Joi.BN().min(0).required(),
|
|
27
27
|
maxFee: Joi.BN().min(0).required(),
|
|
28
|
-
data: Joi.any().optional(),
|
|
28
|
+
data: Joi.any().optional().allow(null),
|
|
29
29
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
30
30
|
|
|
31
31
|
const runner = new Runner();
|
|
@@ -19,7 +19,7 @@ const runner = new Runner();
|
|
|
19
19
|
|
|
20
20
|
// 0. verify itx
|
|
21
21
|
const exchangeInfoSchema = Joi.object({
|
|
22
|
-
value: Joi.any().optional(),
|
|
22
|
+
value: Joi.any().optional().allow(null),
|
|
23
23
|
tokensList: Joi.array().items(schemas.tokenInput).default([]),
|
|
24
24
|
assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
|
|
25
25
|
});
|
|
@@ -27,7 +27,7 @@ const schema = Joi.object({
|
|
|
27
27
|
to: schemas.tokenHolder.required(),
|
|
28
28
|
sender: exchangeInfoSchema.required(),
|
|
29
29
|
receiver: exchangeInfoSchema.required(),
|
|
30
|
-
data: Joi.any().optional(),
|
|
30
|
+
data: Joi.any().optional().allow(null),
|
|
31
31
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
32
32
|
runner.use(({ itx }, next) => {
|
|
33
33
|
const { error } = schema.validate(itx);
|
|
@@ -19,10 +19,10 @@ runner.use(pipes.VerifyMultiSig(0));
|
|
|
19
19
|
// 1. verify itx
|
|
20
20
|
const schema = Joi.object({
|
|
21
21
|
to: schemas.tokenHolder.required(),
|
|
22
|
-
value: Joi.any().optional(),
|
|
22
|
+
value: Joi.any().optional().allow(null),
|
|
23
23
|
tokensList: Joi.array().items(schemas.tokenInput).default([]),
|
|
24
24
|
assetsList: Joi.array().items(Joi.DID().prefix().role('ROLE_ASSET')).default([]),
|
|
25
|
-
data: Joi.any().optional(),
|
|
25
|
+
data: Joi.any().optional().allow(null),
|
|
26
26
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
27
27
|
runner.use(({ itx }, next) => {
|
|
28
28
|
const { error } = schema.validate(itx);
|
|
@@ -25,7 +25,7 @@ const verifyAssetOwner = promisify(pipes.VerifyUpdater({ assetKey: 'assets', own
|
|
|
25
25
|
const schema = Joi.object({
|
|
26
26
|
inputsList: schemas.multiInput.min(1).required(),
|
|
27
27
|
outputsList: schemas.multiInput.min(1).required(),
|
|
28
|
-
data: Joi.any().optional(),
|
|
28
|
+
data: Joi.any().optional().allow(null),
|
|
29
29
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
30
30
|
runner.use(({ itx }, next) => {
|
|
31
31
|
const { error } = schema.validate(itx);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.19.
|
|
6
|
+
"version": "1.19.17",
|
|
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.19.
|
|
25
|
-
"@arcblock/did-util": "1.19.
|
|
26
|
-
"@arcblock/jwt": "1.19.
|
|
27
|
-
"@arcblock/validator": "1.19.
|
|
28
|
-
"@ocap/asset": "1.19.
|
|
29
|
-
"@ocap/mcrypto": "1.19.
|
|
30
|
-
"@ocap/merkle-tree": "1.19.
|
|
31
|
-
"@ocap/message": "1.19.
|
|
32
|
-
"@ocap/state": "1.19.
|
|
33
|
-
"@ocap/tx-pipeline": "1.19.
|
|
34
|
-
"@ocap/util": "1.19.
|
|
35
|
-
"@ocap/wallet": "1.19.
|
|
24
|
+
"@arcblock/did": "1.19.17",
|
|
25
|
+
"@arcblock/did-util": "1.19.17",
|
|
26
|
+
"@arcblock/jwt": "1.19.17",
|
|
27
|
+
"@arcblock/validator": "1.19.17",
|
|
28
|
+
"@ocap/asset": "1.19.17",
|
|
29
|
+
"@ocap/mcrypto": "1.19.17",
|
|
30
|
+
"@ocap/merkle-tree": "1.19.17",
|
|
31
|
+
"@ocap/message": "1.19.17",
|
|
32
|
+
"@ocap/state": "1.19.17",
|
|
33
|
+
"@ocap/tx-pipeline": "1.19.17",
|
|
34
|
+
"@ocap/util": "1.19.17",
|
|
35
|
+
"@ocap/wallet": "1.19.17",
|
|
36
36
|
"debug": "^4.3.6",
|
|
37
37
|
"deep-diff": "^1.0.2",
|
|
38
38
|
"empty-value": "^1.0.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"jest": "^29.7.0",
|
|
48
48
|
"start-server-and-test": "^1.14.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "d25d8b52053b0e3254a28c3b44ea5e447ce1c08a"
|
|
51
51
|
}
|