@bithomp/xrpl-api 3.7.28 → 3.7.30
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.
|
@@ -22,6 +22,7 @@ export declare const AccountRootFlagsKeys: {
|
|
|
22
22
|
};
|
|
23
23
|
export declare const XRPLAccountRootFlagsKeys: {
|
|
24
24
|
allowTrustLineClawback: LedgerEntry.AccountRootFlags;
|
|
25
|
+
allowTrustLineLocking: LedgerEntry.AccountRootFlags;
|
|
25
26
|
passwordSpent: LedgerEntry.AccountRootFlags;
|
|
26
27
|
requireDestTag: LedgerEntry.AccountRootFlags;
|
|
27
28
|
requireAuth: LedgerEntry.AccountRootFlags;
|
|
@@ -38,6 +38,7 @@ exports.AccountRootFlagsKeys = {
|
|
|
38
38
|
exports.XRPLAccountRootFlagsKeys = {
|
|
39
39
|
...exports.AccountRootFlagsKeys,
|
|
40
40
|
allowTrustLineClawback: xrpl_1.LedgerEntry.AccountRootFlags.lsfAllowTrustLineClawback,
|
|
41
|
+
allowTrustLineLocking: xrpl_1.LedgerEntry.AccountRootFlags.lsfAllowTrustLineLocking,
|
|
41
42
|
};
|
|
42
43
|
exports.XahauAccountRootFlagsKeys = {
|
|
43
44
|
...exports.AccountRootFlagsKeys,
|
|
@@ -245,6 +245,20 @@ function adjustBalancesForPaymentChannel(balanceChanges, metadata, nativeCurrenc
|
|
|
245
245
|
{ currency: channelChanges.amountChange.currency, value: channelChanges.amountChange.value },
|
|
246
246
|
]);
|
|
247
247
|
}
|
|
248
|
+
else if (channelChanges.status === "deleted") {
|
|
249
|
+
let unlockedAmount = new bignumber_js_1.default(0);
|
|
250
|
+
if (channelChanges?.balanceChange) {
|
|
251
|
+
unlockedAmount = new bignumber_js_1.default(channelChanges?.balanceChange?.value || "0").abs();
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
unlockedAmount = new bignumber_js_1.default(channelChanges.amount.value).minus(channelChanges?.balance?.value || "0");
|
|
255
|
+
}
|
|
256
|
+
if (!unlockedAmount.isZero()) {
|
|
257
|
+
adjustBalancesChanges(balanceChanges, channelChanges.source.address, [
|
|
258
|
+
{ currency: channelChanges.amount.currency, value: `-${unlockedAmount.toString()}` },
|
|
259
|
+
]);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
248
262
|
}
|
|
249
263
|
else if (tx.TransactionType === "PaymentChannelClaim") {
|
|
250
264
|
if (tx.Account === channelChanges.source.address && channelChanges.amountChange) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bithomp/xrpl-api",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.30",
|
|
4
4
|
"description": "A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
43
43
|
"lint": "eslint",
|
|
44
44
|
"prepare": "npm run build",
|
|
45
|
-
"prepublishOnly": "npm test && npm run lint",
|
|
45
|
+
"-prepublishOnly": "npm test && npm run lint",
|
|
46
46
|
"preversion": "npm run lint",
|
|
47
47
|
"version": "npm run format && git add -A src",
|
|
48
48
|
"postversion": "git push && git push --tags"
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"@noble/ed25519": "^3.0.0",
|
|
55
55
|
"@noble/hashes": "^2.0.1",
|
|
56
56
|
"@noble/secp256k1": "^3.0.0",
|
|
57
|
-
"axios": "^1.13.
|
|
57
|
+
"axios": "^1.13.5",
|
|
58
58
|
"base-x": "^5.0.1",
|
|
59
59
|
"bignumber.js": "^9.3.1",
|
|
60
60
|
"lodash": "^4.17.23",
|
|
61
61
|
"ripple-address-codec": "5.0.0",
|
|
62
|
-
"ripple-binary-codec": "2.
|
|
62
|
+
"ripple-binary-codec": "2.7.0",
|
|
63
63
|
"ripple-keypairs": "2.0.0",
|
|
64
|
-
"xrpl": "4.
|
|
64
|
+
"xrpl": "4.6.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@eslint/eslintrc": "^3.3.3",
|
|
@@ -70,16 +70,16 @@
|
|
|
70
70
|
"@types/lodash": "^4.17.23",
|
|
71
71
|
"@types/mocha": "^10.0.10",
|
|
72
72
|
"@types/nconf": "^0.10.7",
|
|
73
|
-
"@types/node": "^25.2.
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
75
|
-
"@typescript-eslint/parser": "^8.
|
|
73
|
+
"@types/node": "^25.2.3",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
75
|
+
"@typescript-eslint/parser": "^8.55.0",
|
|
76
76
|
"chai": "^6.2.2",
|
|
77
77
|
"chai-as-promised": "^8.0.2",
|
|
78
78
|
"eslint": "^9.39.2",
|
|
79
79
|
"eslint-config-prettier": "^10.1.8",
|
|
80
80
|
"eslint-plugin-chai-friendly": "^1.1.0",
|
|
81
81
|
"eslint-plugin-import": "^2.32.0",
|
|
82
|
-
"eslint-plugin-n": "^17.
|
|
82
|
+
"eslint-plugin-n": "^17.24.0",
|
|
83
83
|
"eslint-plugin-promise": "^7.2.1",
|
|
84
84
|
"mocha": "^11.7.5",
|
|
85
85
|
"nconf": "^0.13.0",
|