@ocap/tx-protocols 1.18.121 → 1.18.122
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.
|
@@ -30,6 +30,7 @@ const schema = Joi.object({
|
|
|
30
30
|
message: Joi.string().trim().min(1).max(256).required(),
|
|
31
31
|
revokeWaitingPeriod: Joi.number().integer().min(0).default(0),
|
|
32
32
|
data: Joi.any().optional(),
|
|
33
|
+
nonce: Joi.string().trim().min(1).max(256).allow('').optional(),
|
|
33
34
|
}).options({ stripUnknown: true, noDefaults: false });
|
|
34
35
|
runner.use(({ itx }, next) => {
|
|
35
36
|
const { error } = schema.validate(itx);
|
|
@@ -51,7 +52,7 @@ runner.use(
|
|
|
51
52
|
{
|
|
52
53
|
error: 'INVALID_TX',
|
|
53
54
|
message: 'Invalid staking address',
|
|
54
|
-
fn: ({ tx, itx }) => toStakeAddress(tx.from, itx.receiver) === itx.address,
|
|
55
|
+
fn: ({ tx, itx }) => toStakeAddress(tx.from, itx.receiver, itx.nonce) === itx.address,
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
error: 'INVALID_TX',
|
|
@@ -247,7 +248,7 @@ runner.use(
|
|
|
247
248
|
revocable: !itx.locked,
|
|
248
249
|
slashers: context.slashers,
|
|
249
250
|
revokeWaitingPeriod: context.revokeWaitingPeriod,
|
|
250
|
-
...pick(itx, ['address', 'receiver', 'message', 'data']),
|
|
251
|
+
...pick(itx, ['address', 'receiver', 'message', 'data', 'nonce']),
|
|
251
252
|
...stakeUpdates,
|
|
252
253
|
},
|
|
253
254
|
context
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.18.
|
|
6
|
+
"version": "1.18.122",
|
|
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.
|
|
25
|
-
"@arcblock/did-util": "1.18.
|
|
26
|
-
"@arcblock/jwt": "1.18.
|
|
27
|
-
"@arcblock/validator": "1.18.
|
|
28
|
-
"@ocap/asset": "1.18.
|
|
29
|
-
"@ocap/mcrypto": "1.18.
|
|
30
|
-
"@ocap/merkle-tree": "1.18.
|
|
31
|
-
"@ocap/message": "1.18.
|
|
32
|
-
"@ocap/state": "1.18.
|
|
33
|
-
"@ocap/tx-pipeline": "1.18.
|
|
34
|
-
"@ocap/util": "1.18.
|
|
35
|
-
"@ocap/wallet": "1.18.
|
|
24
|
+
"@arcblock/did": "1.18.122",
|
|
25
|
+
"@arcblock/did-util": "1.18.122",
|
|
26
|
+
"@arcblock/jwt": "1.18.122",
|
|
27
|
+
"@arcblock/validator": "1.18.122",
|
|
28
|
+
"@ocap/asset": "1.18.122",
|
|
29
|
+
"@ocap/mcrypto": "1.18.122",
|
|
30
|
+
"@ocap/merkle-tree": "1.18.122",
|
|
31
|
+
"@ocap/message": "1.18.122",
|
|
32
|
+
"@ocap/state": "1.18.122",
|
|
33
|
+
"@ocap/tx-pipeline": "1.18.122",
|
|
34
|
+
"@ocap/util": "1.18.122",
|
|
35
|
+
"@ocap/wallet": "1.18.122",
|
|
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": "
|
|
50
|
+
"gitHead": "1d522587088f88d0b6f710e89fa18d5d7acbd61f"
|
|
51
51
|
}
|