@ocap/tx-protocols 1.16.8 → 1.16.12
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/asset/create.js +8 -2
- package/package.json +13 -13
|
@@ -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.
|
|
6
|
+
"version": "1.16.12",
|
|
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.
|
|
25
|
-
"@arcblock/did-util": "1.16.
|
|
26
|
-
"@arcblock/validator": "1.16.
|
|
27
|
-
"@ocap/asset": "1.16.
|
|
28
|
-
"@ocap/mcrypto": "1.16.
|
|
29
|
-
"@ocap/merkle-tree": "1.16.
|
|
30
|
-
"@ocap/message": "1.16.
|
|
31
|
-
"@ocap/state": "1.16.
|
|
32
|
-
"@ocap/tx-pipeline": "1.16.
|
|
33
|
-
"@ocap/util": "1.16.
|
|
34
|
-
"@ocap/wallet": "1.16.
|
|
24
|
+
"@arcblock/did": "1.16.12",
|
|
25
|
+
"@arcblock/did-util": "1.16.12",
|
|
26
|
+
"@arcblock/validator": "1.16.12",
|
|
27
|
+
"@ocap/asset": "1.16.12",
|
|
28
|
+
"@ocap/mcrypto": "1.16.12",
|
|
29
|
+
"@ocap/merkle-tree": "1.16.12",
|
|
30
|
+
"@ocap/message": "1.16.12",
|
|
31
|
+
"@ocap/state": "1.16.12",
|
|
32
|
+
"@ocap/tx-pipeline": "1.16.12",
|
|
33
|
+
"@ocap/util": "1.16.12",
|
|
34
|
+
"@ocap/wallet": "1.16.12",
|
|
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": "
|
|
49
|
+
"gitHead": "fbae535a1a8b38bb6942a5d80c4e20f88163833a"
|
|
50
50
|
}
|