@bithomp/xrpl-api 3.2.26 → 3.2.28

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.
@@ -1,6 +1,7 @@
1
1
  import { LedgerEntry, AccountSetAsfFlags } from "xrpl";
2
2
  import { QueueData } from "../types/queue_data";
3
3
  export declare enum XahauAccountRootFlags {
4
+ lsfTshCollect = 33554432,
4
5
  lsfURITokenIssuer = 1073741824,
5
6
  lsfDisallowIncomingRemit = 2147483648
6
7
  }
@@ -36,6 +37,7 @@ export declare const XRPLAccountRootFlagsKeys: {
36
37
  disallowIncomingTrustline: LedgerEntry.AccountRootFlags;
37
38
  };
38
39
  export declare const XahauAccountRootFlagsKeys: {
40
+ tshCollect: XahauAccountRootFlags;
39
41
  uriTokenIssuer: XahauAccountRootFlags;
40
42
  disallowIncomingRemit: XahauAccountRootFlags;
41
43
  passwordSpent: LedgerEntry.AccountRootFlags;
@@ -67,12 +69,13 @@ export interface AccountRootFlagsKeysInterface {
67
69
  disallowIncomingCheck?: boolean;
68
70
  disallowIncomingPayChan?: boolean;
69
71
  disallowIncomingTrustline?: boolean;
70
- amm?: boolean;
71
72
  allowTrustLineClawback?: boolean;
73
+ tshCollect?: boolean;
72
74
  uriTokenIssuer?: boolean;
73
75
  disallowIncomingRemit?: boolean;
74
76
  }
75
77
  export declare enum XahauAccountSetAsfFlags {
78
+ asfTshCollect = 11,
76
79
  asfDisallowIncomingRemit = 16
77
80
  }
78
81
  export declare const AccountSetFlags: {
@@ -91,6 +94,7 @@ export declare const AccountSetFlags: {
91
94
  disallowIncomingPayChan: AccountSetAsfFlags;
92
95
  disallowIncomingTrustline: AccountSetAsfFlags;
93
96
  allowTrustLineClawback: AccountSetAsfFlags;
97
+ tshCollect: XahauAccountSetAsfFlags;
94
98
  disallowIncomingRemit: XahauAccountSetAsfFlags;
95
99
  };
96
100
  export declare const SignerListFlagsKeys: {
@@ -16,6 +16,7 @@ const flags_1 = require("../parse/ledger/flags");
16
16
  const client_1 = require("../client");
17
17
  var XahauAccountRootFlags;
18
18
  (function (XahauAccountRootFlags) {
19
+ XahauAccountRootFlags[XahauAccountRootFlags["lsfTshCollect"] = 33554432] = "lsfTshCollect";
19
20
  XahauAccountRootFlags[XahauAccountRootFlags["lsfURITokenIssuer"] = 1073741824] = "lsfURITokenIssuer";
20
21
  XahauAccountRootFlags[XahauAccountRootFlags["lsfDisallowIncomingRemit"] = 2147483648] = "lsfDisallowIncomingRemit";
21
22
  })(XahauAccountRootFlags || (exports.XahauAccountRootFlags = XahauAccountRootFlags = {}));
@@ -40,6 +41,7 @@ exports.XRPLAccountRootFlagsKeys = {
40
41
  };
41
42
  exports.XahauAccountRootFlagsKeys = {
42
43
  ...exports.AccountRootFlagsKeys,
44
+ tshCollect: XahauAccountRootFlags.lsfTshCollect,
43
45
  uriTokenIssuer: XahauAccountRootFlags.lsfURITokenIssuer,
44
46
  disallowIncomingRemit: XahauAccountRootFlags.lsfDisallowIncomingRemit,
45
47
  };
@@ -54,6 +56,7 @@ function getAccountRootFlagsKeys() {
54
56
  }
55
57
  var XahauAccountSetAsfFlags;
56
58
  (function (XahauAccountSetAsfFlags) {
59
+ XahauAccountSetAsfFlags[XahauAccountSetAsfFlags["asfTshCollect"] = 11] = "asfTshCollect";
57
60
  XahauAccountSetAsfFlags[XahauAccountSetAsfFlags["asfDisallowIncomingRemit"] = 16] = "asfDisallowIncomingRemit";
58
61
  })(XahauAccountSetAsfFlags || (exports.XahauAccountSetAsfFlags = XahauAccountSetAsfFlags = {}));
59
62
  exports.AccountSetFlags = {
@@ -72,6 +75,7 @@ exports.AccountSetFlags = {
72
75
  disallowIncomingPayChan: xrpl_1.AccountSetAsfFlags.asfDisallowIncomingPayChan,
73
76
  disallowIncomingTrustline: xrpl_1.AccountSetAsfFlags.asfDisallowIncomingTrustline,
74
77
  allowTrustLineClawback: xrpl_1.AccountSetAsfFlags.asfAllowTrustLineClawback,
78
+ tshCollect: XahauAccountSetAsfFlags.asfTshCollect,
75
79
  disallowIncomingRemit: XahauAccountSetAsfFlags.asfDisallowIncomingRemit,
76
80
  };
77
81
  exports.SignerListFlagsKeys = {
@@ -12,7 +12,7 @@ function parseMemos(tx) {
12
12
  return (0, common_1.removeUndefined)({
13
13
  type: (0, utils_1.hexToString)(m.Memo.MemoType),
14
14
  format: (0, utils_1.hexToString)(m.Memo.MemoFormat),
15
- data: (0, utils_1.hexToString)(m.Memo.MemoData),
15
+ data: decodeData(m.Memo.MemoData),
16
16
  });
17
17
  });
18
18
  }
@@ -25,3 +25,13 @@ function formattedMemoToMemo(memo) {
25
25
  }),
26
26
  };
27
27
  }
28
+ function decodeData(data) {
29
+ if (!data) {
30
+ return undefined;
31
+ }
32
+ const decoded = (0, utils_1.hexToString)(data);
33
+ if (decoded && decoded.includes("�")) {
34
+ return data;
35
+ }
36
+ return decoded;
37
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "3.2.26",
3
+ "version": "3.2.28",
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",
@@ -43,7 +43,7 @@
43
43
  "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
44
44
  "lint": "eslint",
45
45
  "prepare": "npm run build",
46
- "prepublishOnly": "npm test && npm run lint",
46
+ "-prepublishOnly": "npm test && npm run lint",
47
47
  "preversion": "npm run lint",
48
48
  "version": "npm run format && git add -A src",
49
49
  "postversion": "git push && git push --tags"
@@ -66,10 +66,10 @@
66
66
  "@eslint/eslintrc": "^3.3.1",
67
67
  "@types/chai": "^5.2.2",
68
68
  "@types/chai-as-promised": "^8.0.2",
69
- "@types/lodash": "^4.17.16",
69
+ "@types/lodash": "^4.17.17",
70
70
  "@types/mocha": "^10.0.10",
71
71
  "@types/nconf": "^0.10.7",
72
- "@types/node": "^22.15.19",
72
+ "@types/node": "^22.15.21",
73
73
  "@typescript-eslint/eslint-plugin": "^8.32.1",
74
74
  "@typescript-eslint/parser": "^8.32.1",
75
75
  "chai": "^4.5.0",
@@ -80,7 +80,7 @@
80
80
  "eslint-plugin-import": "^2.31.0",
81
81
  "eslint-plugin-n": "^17.18.0",
82
82
  "eslint-plugin-promise": "^7.2.1",
83
- "mocha": "^11.3.0",
83
+ "mocha": "^11.4.0",
84
84
  "nconf": "^0.13.0",
85
85
  "ts-jest": "^29.3.4",
86
86
  "ts-node": "^10.9.2",