@ocap/tx-protocols 1.16.7 → 1.16.10

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.
@@ -14,8 +14,6 @@ const ensureServiceFee = require('../rollup/pipes/ensure-service-fee');
14
14
 
15
15
  const runner = new Runner();
16
16
 
17
- runner.use(pipes.VerifyMultiSig(0));
18
-
19
17
  // Verify itx
20
18
  runner.use(({ itx }, next) => {
21
19
  const { error } = asset.schema.validate(itx);
@@ -36,6 +34,7 @@ runner.use(
36
34
 
37
35
  // Save for later use
38
36
  context.assetData = itx.data;
37
+ context.signers = [itx.issuer].filter(Boolean);
39
38
 
40
39
  return toAssetAddress(itx) === context.itx.address;
41
40
  },
@@ -43,6 +42,9 @@ runner.use(
43
42
  ])
44
43
  );
45
44
 
45
+ // Ensure issuer signed
46
+ runner.use(pipes.VerifyMultiSigV2({ signersKey: 'signers' }));
47
+
46
48
  // Ensure asset not exist
47
49
  runner.use(pipes.ExtractState({ from: 'itx.address', to: 'assetState', status: 'OK' }));
48
50
  runner.use(
@@ -55,6 +57,10 @@ runner.use(
55
57
  ])
56
58
  );
57
59
 
60
+ // Ensure issuer exist
61
+ runner.use(pipes.ExtractState({ from: 'itx.issuer', to: 'issuerState', status: 'INVALID_ISSUER_STATE', table: 'account' })); // prettier-ignore
62
+ runner.use(pipes.VerifyAccountMigration({ signerKey: 'issuerState' }));
63
+
58
64
  // Ensure sender exist
59
65
  runner.use(pipes.ExtractState({ from: 'tx.from', to: 'senderState', status: 'INVALID_SENDER_STATE', table: 'account' })); // prettier-ignore
60
66
  runner.use(pipes.VerifyAccountMigration({ senderKey: 'senderState' }));
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.7",
6
+ "version": "1.16.10",
7
7
  "description": "Predefined tx pipeline sets to execute certain type of transactions",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -21,17 +21,17 @@
21
21
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@arcblock/did": "1.16.7",
25
- "@arcblock/did-util": "1.16.7",
26
- "@arcblock/validator": "1.16.7",
27
- "@ocap/asset": "1.16.7",
28
- "@ocap/mcrypto": "1.16.7",
29
- "@ocap/merkle-tree": "1.16.7",
30
- "@ocap/message": "1.16.7",
31
- "@ocap/state": "1.16.7",
32
- "@ocap/tx-pipeline": "1.16.7",
33
- "@ocap/util": "1.16.7",
34
- "@ocap/wallet": "1.16.7",
24
+ "@arcblock/did": "1.16.10",
25
+ "@arcblock/did-util": "1.16.10",
26
+ "@arcblock/validator": "1.16.10",
27
+ "@ocap/asset": "1.16.10",
28
+ "@ocap/mcrypto": "1.16.10",
29
+ "@ocap/merkle-tree": "1.16.10",
30
+ "@ocap/message": "1.16.10",
31
+ "@ocap/state": "1.16.10",
32
+ "@ocap/tx-pipeline": "1.16.10",
33
+ "@ocap/util": "1.16.10",
34
+ "@ocap/wallet": "1.16.10",
35
35
  "debug": "^4.3.3",
36
36
  "deep-diff": "^1.0.2",
37
37
  "empty-value": "^1.0.1",
@@ -46,5 +46,5 @@
46
46
  "jest": "^27.3.1",
47
47
  "start-server-and-test": "^1.14.0"
48
48
  },
49
- "gitHead": "2d9b07c134cf57b6f73bf1ff2e76406fb682318e"
49
+ "gitHead": "af4399f2194e20eb83e14dbd3d946cb18eaa0879"
50
50
  }