@ocap/tx-protocols 1.25.0 → 1.25.2
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.
|
@@ -152,7 +152,10 @@ runner.use(pipes.VerifyBlocked({ stateKeys: ['senderState'] }));
|
|
|
152
152
|
// verify staking: get address, extract state, verify amount
|
|
153
153
|
runner.use((context, next) => {
|
|
154
154
|
const { tx, itx } = context;
|
|
155
|
-
|
|
155
|
+
// stake from sender to main token
|
|
156
|
+
const sender = tx.delegator || tx.from;
|
|
157
|
+
const receiver = context.config.token.address;
|
|
158
|
+
context.stakeAddress = toStakeAddress(sender, receiver, itx.token.symbol);
|
|
156
159
|
return next();
|
|
157
160
|
});
|
|
158
161
|
runner.use(
|
|
@@ -15,7 +15,9 @@ module.exports =
|
|
|
15
15
|
} = context;
|
|
16
16
|
|
|
17
17
|
const sender = delegator || from;
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
const { origin } = new URL(website);
|
|
20
|
+
const verificationUrl = `${origin}/.well-known/ocap/tokens.json`;
|
|
19
21
|
|
|
20
22
|
try {
|
|
21
23
|
const response = await fetch(verificationUrl);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.25.
|
|
6
|
+
"version": "1.25.2",
|
|
7
7
|
"description": "Predefined tx pipeline sets to execute certain type of transactions",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"empty-value": "^1.0.1",
|
|
20
20
|
"lodash": "^4.17.21",
|
|
21
21
|
"url-join": "^4.0.1",
|
|
22
|
-
"@arcblock/did": "1.25.
|
|
23
|
-
"@arcblock/
|
|
24
|
-
"@arcblock/
|
|
25
|
-
"@arcblock/
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@ocap/
|
|
29
|
-
"@ocap/
|
|
30
|
-
"@ocap/merkle-tree": "1.25.
|
|
31
|
-
"@ocap/message": "1.25.
|
|
32
|
-
"@ocap/state": "1.25.
|
|
33
|
-
"@ocap/tx-pipeline": "1.25.
|
|
34
|
-
"@ocap/util": "1.25.
|
|
35
|
-
"@ocap/wallet": "1.25.
|
|
22
|
+
"@arcblock/did": "1.25.2",
|
|
23
|
+
"@arcblock/did-util": "1.25.2",
|
|
24
|
+
"@arcblock/jwt": "1.25.2",
|
|
25
|
+
"@arcblock/validator": "1.25.2",
|
|
26
|
+
"@arcblock/vc": "1.25.2",
|
|
27
|
+
"@ocap/asset": "1.25.2",
|
|
28
|
+
"@ocap/mcrypto": "1.25.2",
|
|
29
|
+
"@ocap/client": "1.25.2",
|
|
30
|
+
"@ocap/merkle-tree": "1.25.2",
|
|
31
|
+
"@ocap/message": "1.25.2",
|
|
32
|
+
"@ocap/state": "1.25.2",
|
|
33
|
+
"@ocap/tx-pipeline": "1.25.2",
|
|
34
|
+
"@ocap/util": "1.25.2",
|
|
35
|
+
"@ocap/wallet": "1.25.2"
|
|
36
36
|
},
|
|
37
37
|
"resolutions": {
|
|
38
38
|
"bn.js": "5.2.2",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"jest": "^29.7.0",
|
|
43
43
|
"start-server-and-test": "^1.14.0",
|
|
44
|
-
"@ocap/e2e-test": "1.25.
|
|
45
|
-
"@ocap/statedb-memory": "1.25.
|
|
44
|
+
"@ocap/e2e-test": "1.25.2",
|
|
45
|
+
"@ocap/statedb-memory": "1.25.2"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"lint": "eslint tests lib",
|