@abtnode/auth 1.17.3-beta-20251117-130331-b2ce7065 → 1.17.3-beta-20251118-061144-335cd35d
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/util/client.js +12 -2
- package/package.json +8 -8
package/lib/util/client.js
CHANGED
|
@@ -53,6 +53,12 @@ async function migrateAccountByChain({ chainHost, user, wallet, blocklet }) {
|
|
|
53
53
|
itx: {
|
|
54
54
|
address: user.did,
|
|
55
55
|
pk: user.pk,
|
|
56
|
+
data: {
|
|
57
|
+
type: 'json',
|
|
58
|
+
value: {
|
|
59
|
+
purpose: 'connect-wallet',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
56
62
|
},
|
|
57
63
|
},
|
|
58
64
|
wallet,
|
|
@@ -62,7 +68,7 @@ async function migrateAccountByChain({ chainHost, user, wallet, blocklet }) {
|
|
|
62
68
|
{ tx, wallet },
|
|
63
69
|
{
|
|
64
70
|
headers: {
|
|
65
|
-
'x-gas-payer-sig': sign(info.wallet.address, info.wallet.secretKey, { txHash: toTxHash(buffer) }),
|
|
71
|
+
'x-gas-payer-sig': await sign(info.wallet.address, info.wallet.secretKey, { txHash: toTxHash(buffer) }),
|
|
66
72
|
'x-gas-payer-pk': info.wallet.publicKey,
|
|
67
73
|
},
|
|
68
74
|
}
|
|
@@ -98,7 +104,11 @@ async function ensureStakedForGas({ client, chainHost, wallet }) {
|
|
|
98
104
|
const { token, txConfig } = result.state;
|
|
99
105
|
const holding = (account?.tokens || []).find((x) => x.address === token.address);
|
|
100
106
|
if (toBN(holding?.value || '0').lte(toBN(txConfig.txGas.minStake))) {
|
|
101
|
-
|
|
107
|
+
logger.warn('app do not have enough balance to stake for gas on chain', {
|
|
108
|
+
chain: chainHost,
|
|
109
|
+
address: wallet.address,
|
|
110
|
+
});
|
|
111
|
+
return;
|
|
102
112
|
}
|
|
103
113
|
|
|
104
114
|
// @ts-ignore
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.3-beta-
|
|
6
|
+
"version": "1.17.3-beta-20251118-061144-335cd35d",
|
|
7
7
|
"description": "Simple lib to manage auth in ABT Node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@abtnode/constant": "1.17.3-beta-
|
|
22
|
-
"@abtnode/logger": "1.17.3-beta-
|
|
23
|
-
"@abtnode/util": "1.17.3-beta-
|
|
21
|
+
"@abtnode/constant": "1.17.3-beta-20251118-061144-335cd35d",
|
|
22
|
+
"@abtnode/logger": "1.17.3-beta-20251118-061144-335cd35d",
|
|
23
|
+
"@abtnode/util": "1.17.3-beta-20251118-061144-335cd35d",
|
|
24
24
|
"@arcblock/did": "^1.27.7",
|
|
25
25
|
"@arcblock/did-connect-js": "^1.27.7",
|
|
26
26
|
"@arcblock/did-ext": "^1.27.7",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@arcblock/nft-display": "^3.2.6",
|
|
30
30
|
"@arcblock/validator": "^1.27.7",
|
|
31
31
|
"@arcblock/vc": "^1.27.7",
|
|
32
|
-
"@blocklet/constant": "1.17.3-beta-
|
|
32
|
+
"@blocklet/constant": "1.17.3-beta-20251118-061144-335cd35d",
|
|
33
33
|
"@blocklet/error": "^0.3.3",
|
|
34
|
-
"@blocklet/meta": "1.17.3-beta-
|
|
35
|
-
"@blocklet/sdk": "1.17.3-beta-
|
|
34
|
+
"@blocklet/meta": "1.17.3-beta-20251118-061144-335cd35d",
|
|
35
|
+
"@blocklet/sdk": "1.17.3-beta-20251118-061144-335cd35d",
|
|
36
36
|
"@ocap/client": "^1.27.7",
|
|
37
37
|
"@ocap/mcrypto": "^1.27.7",
|
|
38
38
|
"@ocap/util": "^1.27.7",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"axios-mock-adapter": "^2.1.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "8e2245b336c9b4cdfd8e53012ab44a11b68c5665"
|
|
59
59
|
}
|