@bithomp/xrpl-api 3.2.10 → 3.2.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.
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.parseAmmChanges = parseAmmChanges;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
- const utils_1 = require("../utils");
9
8
  const common_1 = require("../../common");
9
+ const utils_1 = require("../utils");
10
10
  const amount_1 = __importDefault(require("../ledger/amount"));
11
11
  const asset_1 = __importDefault(require("../ledger/asset"));
12
12
  const auth_accounts_1 = __importDefault(require("../ledger/auth-accounts"));
@@ -44,7 +44,7 @@ function parseVoteSlot(voteSlot) {
44
44
  }
45
45
  function summarizeVoteSlotsChanges(node) {
46
46
  const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
47
- const prev = node.previousFields || {};
47
+ const prev = node.previousFields;
48
48
  const changes = final.VoteSlots.reduce((acc, slot) => {
49
49
  const prevSlot = prev.VoteSlots.find((s) => s.VoteEntry.Account === slot.VoteEntry.Account);
50
50
  if (!prevSlot) {
@@ -89,7 +89,7 @@ function summarizeVoteSlotsChanges(node) {
89
89
  }
90
90
  function summarizeActionSlotChanges(node) {
91
91
  const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
92
- const prev = node.previousFields || {};
92
+ const prev = node.previousFields;
93
93
  const changes = {};
94
94
  if (prev.AuctionSlot) {
95
95
  if (final.AuctionSlot.Account !== prev.AuctionSlot.Account) {
@@ -165,14 +165,14 @@ function isEqualAuthAccounts(obj1, obj2) {
165
165
  }
166
166
  function summarizeAmm(node) {
167
167
  const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
168
- const prev = node.previousFields || {};
168
+ const prev = node.previousFields;
169
169
  let asset = (0, asset_1.default)(final.Asset);
170
170
  if (node.diffType === "CreatedNode" && !asset) {
171
171
  asset = { currency: (0, client_1.getNativeCurrency)() };
172
172
  }
173
173
  const summary = {
174
174
  status: parseAmmStatus(node),
175
- ammID: node.LedgerIndex,
175
+ ammID: node.ledgerIndex,
176
176
  account: final.Account,
177
177
  asset: asset,
178
178
  asset2: (0, asset_1.default)(final.Asset2),
@@ -202,8 +202,13 @@ function summarizeAmm(node) {
202
202
  return (0, common_1.removeUndefined)(summary);
203
203
  }
204
204
  function parseAmmChanges(metadata) {
205
- const amms = (0, utils_1.normalizeNodes)(metadata).filter((n) => {
206
- return n.entryType === "AMM";
205
+ const affectedNodes = metadata.AffectedNodes.filter((affectedNode) => {
206
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
207
+ return node.LedgerEntryType === "AMM";
207
208
  });
208
- return amms.length === 1 ? summarizeAmm(amms[0]) : undefined;
209
+ if (affectedNodes.length !== 1) {
210
+ return undefined;
211
+ }
212
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNodes[0]);
213
+ return summarizeAmm(normalizedNode);
209
214
  }
@@ -13,9 +13,7 @@ export interface AddressBalanceChangeQuantity {
13
13
  export interface BalanceChanges {
14
14
  [key: string]: BalanceChangeQuantity[];
15
15
  }
16
- declare function parseBalanceChanges(metadata: TransactionMetadata, nativeCurrency?: string): {
17
- [x: string]: BalanceChangeQuantity[];
18
- };
16
+ declare function parseBalanceChanges(metadata: TransactionMetadata, nativeCurrency?: string): BalanceChanges;
19
17
  declare function parseFinalBalances(metadata: TransactionMetadata, nativeCurrency?: string): {
20
18
  [x: string]: BalanceChangeQuantity[];
21
19
  };
@@ -8,8 +8,8 @@ exports.parseFinalBalances = parseFinalBalances;
8
8
  const lodash_1 = __importDefault(require("lodash"));
9
9
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
10
10
  const common_1 = require("../../common");
11
- const utils_1 = require("../utils");
12
11
  const client_1 = require("../../client");
12
+ const utils_1 = require("../utils");
13
13
  function groupByAddress(balanceChanges) {
14
14
  const grouped = lodash_1.default.groupBy(balanceChanges, function (node) {
15
15
  return node.address;
@@ -63,7 +63,7 @@ function parseXRPQuantity(node, valueParser, nativeCurrency) {
63
63
  return null;
64
64
  }
65
65
  return {
66
- address: node.finalFields.Account || node.newFields.Account,
66
+ address: (node.finalFields.Account || node.newFields.Account),
67
67
  balance: {
68
68
  currency: nativeCurrency || (0, client_1.getNativeCurrency)(),
69
69
  value: (0, common_1.dropsToXrp)(value).toString(),
@@ -114,15 +114,20 @@ function parseMPTQuantity(node, valueParser) {
114
114
  };
115
115
  }
116
116
  function parseQuantities(metadata, valueParser, nativeCurrency) {
117
- const values = (0, utils_1.normalizeNodes)(metadata).map(function (node) {
118
- if (node.entryType === "AccountRoot") {
119
- return [parseXRPQuantity(node, valueParser, nativeCurrency)];
117
+ const values = metadata.AffectedNodes.map(function (affectedNode) {
118
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
119
+ if (!["AccountRoot", "RippleState", "MPToken"].includes(node.LedgerEntryType)) {
120
+ return [];
121
+ }
122
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNode);
123
+ if (node.LedgerEntryType === "AccountRoot") {
124
+ return [parseXRPQuantity(normalizedNode, valueParser, nativeCurrency)];
120
125
  }
121
- else if (node.entryType === "RippleState") {
122
- return parseTrustlineQuantity(node, valueParser);
126
+ else if (node.LedgerEntryType === "RippleState") {
127
+ return parseTrustlineQuantity(normalizedNode, valueParser);
123
128
  }
124
- else if (node.entryType === "MPToken") {
125
- return [parseMPTQuantity(node, valueParser)];
129
+ else if (node.LedgerEntryType === "MPToken") {
130
+ return [parseMPTQuantity(normalizedNode, valueParser)];
126
131
  }
127
132
  return [];
128
133
  });
@@ -1,9 +1,20 @@
1
- declare function parseChannelChanges(metadata: any): {
2
- status: string | undefined;
3
- channelId: any;
4
- source: any;
5
- destination: any;
1
+ import { TransactionMetadata } from "xrpl";
2
+ import { FormattedSourceAddress, FormattedDestinationAddress } from "../../types/account";
3
+ import { IssuedCurrencyAmount } from "../../types/amounts";
4
+ interface FormattedChannelSummaryInterface {
5
+ status?: "created" | "modified" | "deleted";
6
+ channelId: string;
7
+ source?: FormattedSourceAddress;
8
+ destination?: FormattedDestinationAddress;
6
9
  channelAmountDrops: string;
7
- channelBalanceDrops: string;
8
- } | undefined;
10
+ amount: IssuedCurrencyAmount;
11
+ channelBalanceDrops?: string;
12
+ balance?: IssuedCurrencyAmount;
13
+ channelAmountChangeDrops?: string;
14
+ amountChange?: IssuedCurrencyAmount;
15
+ channelBalanceChangeDrops?: string;
16
+ balanceChange?: IssuedCurrencyAmount;
17
+ previousTxnID?: string;
18
+ }
19
+ declare function parseChannelChanges(metadata: TransactionMetadata): FormattedChannelSummaryInterface | undefined;
9
20
  export { parseChannelChanges };
@@ -5,6 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.parseChannelChanges = parseChannelChanges;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
+ const amount_1 = __importDefault(require("../ledger/amount"));
9
+ const source_1 = require("../ledger/source");
10
+ const destination_1 = require("../ledger/destination");
8
11
  const utils_1 = require("../utils");
9
12
  function parsePaymentChannelStatus(node) {
10
13
  if (node.diffType === "CreatedNode") {
@@ -20,24 +23,34 @@ function parsePaymentChannelStatus(node) {
20
23
  }
21
24
  function summarizePaymentChannel(node) {
22
25
  const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
23
- const prev = node.previousFields || {};
26
+ const prev = node.previousFields;
24
27
  const summary = {
25
28
  status: parsePaymentChannelStatus(node),
26
29
  channelId: node.ledgerIndex,
27
- source: final.Account,
28
- destination: final.Destination,
30
+ source: (0, source_1.parseSource)(final),
31
+ destination: (0, destination_1.parseDestination)(final),
29
32
  channelAmountDrops: new bignumber_js_1.default(final.Amount || 0).toString(10),
30
- channelBalanceDrops: new bignumber_js_1.default(final.Balance || 0).toString(10),
33
+ amount: (0, amount_1.default)(final.Amount),
31
34
  };
35
+ if (final.Balance) {
36
+ summary.channelBalanceDrops = new bignumber_js_1.default(final.Balance || 0).toString(10);
37
+ summary.balance = (0, amount_1.default)(final.Balance);
38
+ }
32
39
  if (prev.Amount) {
33
- summary.channelAmountChangeDrops = new bignumber_js_1.default(final.Amount)
34
- .minus(new bignumber_js_1.default(prev.Amount || 0))
40
+ summary.channelAmountChangeDrops = new bignumber_js_1.default(final.Amount).minus(new bignumber_js_1.default(prev.Amount || 0)).toString(10);
41
+ summary.amountChange = (0, amount_1.default)(prev.SendMax);
42
+ summary.amountChange.value = new bignumber_js_1.default(summary.amountChange.value)
43
+ .minus(new bignumber_js_1.default(summary.amount.value))
35
44
  .toString(10);
36
45
  }
37
46
  if (prev.Balance) {
38
47
  summary.channelBalanceChangeDrops = new bignumber_js_1.default(final.Balance)
39
48
  .minus(new bignumber_js_1.default(prev.Balance || 0))
40
49
  .toString(10);
50
+ summary.balanceChange = (0, amount_1.default)(prev.SendMax);
51
+ summary.balanceChange.value = new bignumber_js_1.default(summary.balanceChange.value)
52
+ .minus(new bignumber_js_1.default(summary.balance?.value || 0))
53
+ .toString(10);
41
54
  }
42
55
  if (node.PreviousTxnID) {
43
56
  summary.previousTxnID = node.PreviousTxnID;
@@ -45,8 +58,13 @@ function summarizePaymentChannel(node) {
45
58
  return summary;
46
59
  }
47
60
  function parseChannelChanges(metadata) {
48
- const paymentChannels = (0, utils_1.normalizeNodes)(metadata).filter((n) => {
49
- return n.entryType === "PayChannel";
61
+ const affectedNodes = metadata.AffectedNodes.filter((affectedNode) => {
62
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
63
+ return node.LedgerEntryType === "PayChannel";
50
64
  });
51
- return paymentChannels.length === 1 ? summarizePaymentChannel(paymentChannels[0]) : undefined;
65
+ if (affectedNodes.length !== 1) {
66
+ return undefined;
67
+ }
68
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNodes[0]);
69
+ return summarizePaymentChannel(normalizedNode);
52
70
  }
@@ -0,0 +1,17 @@
1
+ import { TransactionMetadata } from "xrpl";
2
+ import { FormattedSourceAddress, FormattedDestinationAddress } from "../../types/account";
3
+ import { IssuedCurrencyAmount, FormattedIssuedMPTAmount } from "../../types/amounts";
4
+ interface FormattedCheckSummaryInterface {
5
+ status?: "created" | "modified" | "deleted";
6
+ checkID: string;
7
+ source?: FormattedSourceAddress;
8
+ destination?: FormattedDestinationAddress;
9
+ sendMax: IssuedCurrencyAmount | FormattedIssuedMPTAmount;
10
+ expiration?: number;
11
+ invoiceID?: string;
12
+ sequence?: number;
13
+ sendMaxChange?: IssuedCurrencyAmount | FormattedIssuedMPTAmount;
14
+ previousTxnID?: string;
15
+ }
16
+ declare function parseCheckChanges(metadata: TransactionMetadata): FormattedCheckSummaryInterface | undefined;
17
+ export { parseCheckChanges };
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parseCheckChanges = parseCheckChanges;
7
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
+ const amount_1 = __importDefault(require("../ledger/amount"));
9
+ const source_1 = require("../ledger/source");
10
+ const destination_1 = require("../ledger/destination");
11
+ const utils_1 = require("../utils");
12
+ const models_1 = require("../../models");
13
+ function parseCheckStatus(node) {
14
+ if (node.diffType === "CreatedNode") {
15
+ return "created";
16
+ }
17
+ if (node.diffType === "ModifiedNode") {
18
+ return "modified";
19
+ }
20
+ if (node.diffType === "DeletedNode") {
21
+ return "deleted";
22
+ }
23
+ return undefined;
24
+ }
25
+ function summarizeCheck(node) {
26
+ const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
27
+ const prev = node.previousFields;
28
+ const summary = {
29
+ status: parseCheckStatus(node),
30
+ checkID: node.ledgerIndex,
31
+ source: (0, source_1.parseSource)(final),
32
+ destination: (0, destination_1.parseDestination)(final),
33
+ sendMax: (0, amount_1.default)(final.SendMax),
34
+ sequence: final.Sequence,
35
+ };
36
+ if (final.Expiration) {
37
+ summary.expiration = (0, models_1.ledgerTimeToUnixTime)(final.Expiration);
38
+ }
39
+ if (final.InvoiceID) {
40
+ summary.invoiceID = final.InvoiceID;
41
+ }
42
+ if (prev.SendMax) {
43
+ summary.sendMaxChange = (0, amount_1.default)(prev.SendMax);
44
+ summary.sendMaxChange.value = new bignumber_js_1.default(summary.sendMaxChange.value)
45
+ .minus(new bignumber_js_1.default(summary.sendMax.value))
46
+ .toString(10);
47
+ }
48
+ if (node.PreviousTxnID) {
49
+ summary.previousTxnID = node.PreviousTxnID;
50
+ }
51
+ return summary;
52
+ }
53
+ function parseCheckChanges(metadata) {
54
+ const affectedNodes = metadata.AffectedNodes.filter((affectedNode) => {
55
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
56
+ return node.LedgerEntryType === "Check";
57
+ });
58
+ if (affectedNodes.length !== 1) {
59
+ return undefined;
60
+ }
61
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNodes[0]);
62
+ return summarizeCheck(normalizedNode);
63
+ }
@@ -17,10 +17,10 @@ function parseDIDStatus(node) {
17
17
  }
18
18
  function summarizeDID(node) {
19
19
  const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
20
- const prev = node.previousFields || {};
20
+ const prev = node.previousFields;
21
21
  const summary = {
22
22
  status: parseDIDStatus(node),
23
- didID: node.LedgerIndex,
23
+ didID: node.ledgerIndex,
24
24
  account: final.Account,
25
25
  uri: final.URI,
26
26
  data: final.Data,
@@ -38,8 +38,13 @@ function summarizeDID(node) {
38
38
  return (0, common_1.removeUndefined)(summary);
39
39
  }
40
40
  function parseDIDChanges(metadata) {
41
- const dids = (0, utils_1.normalizeNodes)(metadata).filter((n) => {
42
- return n.entryType === "DID";
41
+ const affectedNodes = metadata.AffectedNodes.filter((affectedNode) => {
42
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
43
+ return node.LedgerEntryType === "DID";
43
44
  });
44
- return dids.length === 1 ? summarizeDID(dids[0]) : undefined;
45
+ if (affectedNodes.length !== 1) {
46
+ return undefined;
47
+ }
48
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNodes[0]);
49
+ return summarizeDID(normalizedNode);
45
50
  }
@@ -1,7 +1,7 @@
1
1
  import { FormattedSourceAddress, FormattedDestinationAddress } from "../../types/account";
2
2
  interface FormattedEscrowSummaryInterface {
3
3
  status?: "created" | "cancelled" | "executed" | "deleted";
4
- escrowIndex?: number;
4
+ escrowIndex?: string;
5
5
  escrowSequence?: number;
6
6
  amount?: string;
7
7
  condition?: string;
@@ -63,8 +63,13 @@ function summarizeEscrow(tx, node) {
63
63
  return (0, common_1.removeUndefined)(summary);
64
64
  }
65
65
  function parseEscrowChanges(tx) {
66
- const escrows = (0, utils_1.normalizeNodes)(tx.meta).filter((n) => {
67
- return n.entryType === "Escrow";
66
+ const affectedNodes = tx.meta.AffectedNodes.filter((affectedNode) => {
67
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
68
+ return node.LedgerEntryType === "Escrow";
68
69
  });
69
- return escrows.length === 1 ? summarizeEscrow(tx, escrows[0]) : undefined;
70
+ if (affectedNodes.length !== 1) {
71
+ return undefined;
72
+ }
73
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNodes[0]);
74
+ return summarizeEscrow(tx, normalizedNode);
70
75
  }
@@ -6,6 +6,7 @@ export { parseURITokenSellOfferChanges } from "./uritoken_sell_offer_changes";
6
6
  export { parseBalanceChanges } from "./balance_changes";
7
7
  export { parseLockedBalanceChanges } from "./locked_balance_changes";
8
8
  export { parseChannelChanges } from "./channel_changes";
9
+ export { parseCheckChanges } from "./check_changes";
9
10
  export { parseOrderbookChanges } from "./orderbook_changes";
10
11
  export { parseHooksExecutions } from "./hooks_executions";
11
12
  export { parseEmittedTxns } from "./emitted_txns";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseMPTokenChanges = exports.parseMPTokenIssuanceChanges = exports.parseDeliveredAmount = exports.parseOracleChanges = exports.parseDIDChanges = exports.parseAmmChanges = exports.parseUNLReportChanges = exports.parseEscrowChanges = exports.parseEmittedTxns = exports.parseHooksExecutions = exports.parseOrderbookChanges = exports.parseChannelChanges = exports.parseLockedBalanceChanges = exports.parseBalanceChanges = exports.parseURITokenSellOfferChanges = exports.parseURITokenChanges = exports.parseNFTokenOfferChanges = exports.parseNFTokenChanges = exports.parseAffectedObjects = void 0;
3
+ exports.parseMPTokenChanges = exports.parseMPTokenIssuanceChanges = exports.parseDeliveredAmount = exports.parseOracleChanges = exports.parseDIDChanges = exports.parseAmmChanges = exports.parseUNLReportChanges = exports.parseEscrowChanges = exports.parseEmittedTxns = exports.parseHooksExecutions = exports.parseOrderbookChanges = exports.parseCheckChanges = exports.parseChannelChanges = exports.parseLockedBalanceChanges = exports.parseBalanceChanges = exports.parseURITokenSellOfferChanges = exports.parseURITokenChanges = exports.parseNFTokenOfferChanges = exports.parseNFTokenChanges = exports.parseAffectedObjects = void 0;
4
4
  var affected_objects_1 = require("./affected_objects");
5
5
  Object.defineProperty(exports, "parseAffectedObjects", { enumerable: true, get: function () { return affected_objects_1.parseAffectedObjects; } });
6
6
  var nftoken_changes_1 = require("./nftoken_changes");
@@ -17,6 +17,8 @@ var locked_balance_changes_1 = require("./locked_balance_changes");
17
17
  Object.defineProperty(exports, "parseLockedBalanceChanges", { enumerable: true, get: function () { return locked_balance_changes_1.parseLockedBalanceChanges; } });
18
18
  var channel_changes_1 = require("./channel_changes");
19
19
  Object.defineProperty(exports, "parseChannelChanges", { enumerable: true, get: function () { return channel_changes_1.parseChannelChanges; } });
20
+ var check_changes_1 = require("./check_changes");
21
+ Object.defineProperty(exports, "parseCheckChanges", { enumerable: true, get: function () { return check_changes_1.parseCheckChanges; } });
20
22
  var orderbook_changes_1 = require("./orderbook_changes");
21
23
  Object.defineProperty(exports, "parseOrderbookChanges", { enumerable: true, get: function () { return orderbook_changes_1.parseOrderbookChanges; } });
22
24
  var hooks_executions_1 = require("./hooks_executions");
@@ -62,9 +62,14 @@ function parseTrustlineQuantity(node, valueParser) {
62
62
  return [result];
63
63
  }
64
64
  function parseQuantities(metadata, valueParser) {
65
- const values = (0, utils_1.normalizeNodes)(metadata).map(function (node) {
66
- if (node.entryType === "RippleState") {
67
- return parseTrustlineQuantity(node, valueParser);
65
+ const values = metadata.AffectedNodes.map(function (affectedNode) {
66
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
67
+ if (node.LedgerEntryType !== "RippleState") {
68
+ return [];
69
+ }
70
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNode);
71
+ if (node.LedgerEntryType === "RippleState") {
72
+ return parseTrustlineQuantity(normalizedNode, valueParser);
68
73
  }
69
74
  return [];
70
75
  });
@@ -55,7 +55,7 @@ function parsePriceDataSeries(series) {
55
55
  }
56
56
  function summarizePriceDataSeriesChanges(node) {
57
57
  const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
58
- const prev = node.previousFields || {};
58
+ const prev = node.previousFields;
59
59
  const changes = final.PriceDataSeries.reduce((acc, series) => {
60
60
  const prevSeries = prev.PriceDataSeries.find((s) => s.PriceData.BaseAsset === series.PriceData.BaseAsset && s.PriceData.QuoteAsset === series.PriceData.QuoteAsset);
61
61
  const priceFinal = hexPriceToBigNumber(series.PriceData.AssetPrice) || new bignumber_js_1.default(0);
@@ -115,10 +115,10 @@ function summarizePriceDataSeriesChanges(node) {
115
115
  }
116
116
  function summarizeOracle(node) {
117
117
  const final = node.diffType === "CreatedNode" ? node.newFields : node.finalFields;
118
- const prev = node.previousFields || {};
118
+ const prev = node.previousFields;
119
119
  const summary = {
120
120
  status: parseOracleStatus(node),
121
- oracleID: node.LedgerIndex,
121
+ oracleID: node.ledgerIndex,
122
122
  oracleDocumentID: final.OracleDocumentID,
123
123
  provider: final.Provider,
124
124
  uri: final.URI,
@@ -138,8 +138,13 @@ function summarizeOracle(node) {
138
138
  return (0, common_1.removeUndefined)(summary);
139
139
  }
140
140
  function parseOracleChanges(metadata) {
141
- const oracles = (0, utils_1.normalizeNodes)(metadata).filter((n) => {
142
- return n.entryType === "Oracle";
141
+ const affectedNodes = metadata.AffectedNodes.filter((affectedNode) => {
142
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
143
+ return node.LedgerEntryType === "Oracle";
143
144
  });
144
- return oracles.length === 1 ? summarizeOracle(oracles[0]) : undefined;
145
+ if (affectedNodes.length !== 1) {
146
+ return undefined;
147
+ }
148
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNodes[0]);
149
+ return summarizeOracle(normalizedNode);
145
150
  }
@@ -31,18 +31,18 @@ function convertOrderChange(order) {
31
31
  });
32
32
  }
33
33
  function getExpirationTime(node) {
34
- const expirationTime = node.finalFields.Expiration || node.newFields.Expiration;
34
+ const expirationTime = (node.finalFields.Expiration || node.newFields.Expiration);
35
35
  if (expirationTime === undefined) {
36
36
  return undefined;
37
37
  }
38
38
  return new Date((0, models_1.ledgerTimeToTimestamp)(expirationTime)).toISOString();
39
39
  }
40
40
  function getQuality(node) {
41
- const takerGets = node.finalFields.TakerGets || node.newFields.TakerGets;
42
- const takerPays = node.finalFields.TakerPays || node.newFields.TakerPays;
41
+ const takerGets = (node.finalFields.TakerGets || node.newFields.TakerGets);
42
+ const takerPays = (node.finalFields.TakerPays || node.newFields.TakerPays);
43
43
  const takerGetsCurrency = takerGets.currency || (0, client_1.getNativeCurrency)();
44
44
  const takerPaysCurrency = takerPays.currency || (0, client_1.getNativeCurrency)();
45
- const bookDirectory = node.finalFields.BookDirectory || node.newFields.BookDirectory;
45
+ const bookDirectory = (node.finalFields.BookDirectory || node.newFields.BookDirectory);
46
46
  const qualityHex = bookDirectory.substring(bookDirectory.length - 16);
47
47
  return (0, orderbook_quality_1.parseOrderbookQuality)(qualityHex, takerGetsCurrency, takerPaysCurrency);
48
48
  }
@@ -87,7 +87,7 @@ function parseOrderChange(node) {
87
87
  taker_pays: parseChangeAmount(node, "TakerPays"),
88
88
  taker_gets: parseChangeAmount(node, "TakerGets"),
89
89
  sell: (node.finalFields.Flags & xrpl_1.LedgerEntry.OfferFlags.lsfSell) !== 0,
90
- sequence: node.finalFields.Sequence || node.newFields.Sequence,
90
+ sequence: (node.finalFields.Sequence || node.newFields.Sequence),
91
91
  status: parseOrderStatus(node),
92
92
  quality: getQuality(node),
93
93
  expiration: getExpirationTime(node),
@@ -103,9 +103,13 @@ function groupByAddress(orderChanges) {
103
103
  });
104
104
  }
105
105
  function parseOrderbookChanges(metadata) {
106
- const nodes = (0, utils_1.normalizeNodes)(metadata);
107
- const orderChanges = lodash_1.default.map(lodash_1.default.filter(nodes, function (node) {
108
- return node.entryType === "Offer";
109
- }), parseOrderChange);
106
+ const affectedNodes = metadata.AffectedNodes.filter((affectedNode) => {
107
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
108
+ return node.LedgerEntryType === "Offer";
109
+ });
110
+ const orderChanges = affectedNodes.map((affectedNode) => {
111
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNode);
112
+ return parseOrderChange(normalizedNode);
113
+ });
110
114
  return groupByAddress(orderChanges);
111
115
  }
@@ -36,8 +36,13 @@ function summarizeUNLReport(tx, node) {
36
36
  return undefined;
37
37
  }
38
38
  function parseUNLReportChanges(tx) {
39
- const escrows = (0, utils_1.normalizeNodes)(tx.meta).filter((n) => {
40
- return n.entryType === "UNLReport";
39
+ const affectedNodes = tx.meta.AffectedNodes.filter((affectedNode) => {
40
+ const node = affectedNode.CreatedNode || affectedNode.ModifiedNode || affectedNode.DeletedNode;
41
+ return node.LedgerEntryType === "UNLReport";
41
42
  });
42
- return escrows.length === 1 ? summarizeUNLReport(tx, escrows[0]) : undefined;
43
+ if (affectedNodes.length !== 1) {
44
+ return undefined;
45
+ }
46
+ const normalizedNode = (0, utils_1.normalizeNode)(affectedNodes[0]);
47
+ return summarizeUNLReport(tx, normalizedNode);
43
48
  }
@@ -1,57 +1,192 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseOutcome = parseOutcome;
4
+ const client_1 = require("../client");
4
5
  const index_1 = require("./outcome/index");
5
6
  const utils_1 = require("./utils");
6
7
  const common_1 = require("../common");
8
+ const ESCROW_TYPES = ["EscrowFinish", "EscrowCreate", "EscrowCancel"];
9
+ const CHANNEL_TYPES = ["PaymentChannelCreate", "PaymentChannelFund", "PaymentChannelClaim"];
10
+ const CHECK_TYPES = ["CheckCreate", "CheckCash", "CheckCancel"];
11
+ const NFTOKEN_TYPES = ["NFTokenMint", "NFTokenBurn", "NFTokenCreateOffer", "NFTokenCancelOffer", "NFTokenAcceptOffer"];
12
+ const URITOKEN_TYPES = [
13
+ "Remit",
14
+ "URITokenMint",
15
+ "URITokenBurn",
16
+ "URITokenBuy",
17
+ "URITokenCreateSellOffer",
18
+ "URITokenCancelSellOffer",
19
+ ];
20
+ const AMM_TYPES = ["AMMBid", "AMMCreate", "AMMDelete", "AMMDeposit", "AMMWithdraw", "AMMVote", "AMMClawback"];
21
+ const DID_TYPES = ["DIDSet", "DIDDelete"];
22
+ const ORACLE_TYPES = ["OracleSet", "OracleDelete"];
23
+ const UNL_REPORT_TYPES = ["UNLReport"];
24
+ const MPTOKEN_TYPES = [
25
+ "MPTokenIssuanceCreate",
26
+ "MPTokenAuthorize",
27
+ "MPTokenIssuanceSet",
28
+ "MPTokenIssuanceDestroy",
29
+ "Payment",
30
+ "Clawback",
31
+ ];
7
32
  function parseOutcome(tx, nativeCurrency, definitions) {
8
33
  const metadata = tx.meta || tx.metaData;
9
34
  if (!metadata) {
10
35
  return undefined;
11
36
  }
12
- const balanceChanges = (0, index_1.parseBalanceChanges)(metadata, nativeCurrency);
13
- const lockedBalanceChanges = (0, index_1.parseLockedBalanceChanges)(metadata);
14
- const orderbookChanges = (0, index_1.parseOrderbookChanges)(metadata);
15
- const channelChanges = (0, index_1.parseChannelChanges)(metadata);
16
- const escrowChanges = (0, index_1.parseEscrowChanges)(tx);
17
- const nftokenChanges = (0, index_1.parseNFTokenChanges)(tx);
18
- const nftokenOfferChanges = (0, index_1.parseNFTokenOfferChanges)(tx);
19
- const uritokenChanges = (0, index_1.parseURITokenChanges)(tx);
20
- const uritokenSellOfferChanges = (0, index_1.parseURITokenSellOfferChanges)(tx);
21
- const affectedObjects = (0, index_1.parseAffectedObjects)(tx);
22
- const hooksExecutions = (0, index_1.parseHooksExecutions)(tx);
23
- const emittedTxns = (0, index_1.parseEmittedTxns)(tx, definitions);
24
- const unlReportChanges = (0, index_1.parseUNLReportChanges)(tx);
25
- const ammChanges = (0, index_1.parseAmmChanges)(metadata);
26
- const didChanges = (0, index_1.parseDIDChanges)(metadata);
27
- const oracleChanges = (0, index_1.parseOracleChanges)(metadata);
28
- const mptokenIssuanceChanges = (0, index_1.parseMPTokenIssuanceChanges)(tx);
29
- const mptokenChanges = (0, index_1.parseMPTokenChanges)(tx);
30
37
  return (0, common_1.removeUndefined)({
31
38
  result: tx.meta.TransactionResult,
32
39
  timestamp: (0, utils_1.parseTimestamp)(tx.date),
33
40
  fee: (0, common_1.dropsToXrp)(tx.Fee),
34
- balanceChanges: Object.keys(balanceChanges).length > 0 ? balanceChanges : undefined,
35
- lockedBalanceChanges: Object.keys(lockedBalanceChanges).length > 0 ? lockedBalanceChanges : undefined,
36
- orderbookChanges: Object.keys(orderbookChanges).length > 0 ? orderbookChanges : undefined,
37
- channelChanges,
38
- escrowChanges,
39
- nftokenChanges: Object.keys(nftokenChanges).length > 0 ? nftokenChanges : undefined,
40
- nftokenOfferChanges: Object.keys(nftokenOfferChanges).length > 0 ? nftokenOfferChanges : undefined,
41
- uritokenChanges: Object.keys(uritokenChanges).length > 0 ? uritokenChanges : undefined,
42
- uritokenSellOfferChanges: Object.keys(uritokenSellOfferChanges).length > 0 ? uritokenSellOfferChanges : undefined,
43
- affectedObjects: affectedObjects ? (0, common_1.removeUndefined)(affectedObjects) : undefined,
44
- ammChanges: ammChanges ? (0, common_1.removeUndefined)(ammChanges) : undefined,
45
- didChanges: didChanges ? (0, common_1.removeUndefined)(didChanges) : undefined,
46
- oracleChanges: oracleChanges ? (0, common_1.removeUndefined)(oracleChanges) : undefined,
47
- mptokenIssuanceChanges: Object.keys(mptokenIssuanceChanges).length > 0 ? mptokenIssuanceChanges : undefined,
48
- mptokenChanges: Object.keys(mptokenChanges).length > 0 ? mptokenChanges : undefined,
49
- unlReportChanges,
50
- hooksExecutions,
51
- emittedTxns,
41
+ balanceChanges: getBalanceChanges(tx, nativeCurrency || (0, client_1.getNativeCurrency)()),
42
+ lockedBalanceChanges: getLockedBalanceChanges(tx),
43
+ orderbookChanges: getOrderbookChanges(tx),
44
+ channelChanges: getChannelChanges(tx),
45
+ checkChanges: getCheckChanges(tx),
46
+ escrowChanges: getEscrowChanges(tx),
47
+ nftokenChanges: getNFTokenChanges(tx),
48
+ nftokenOfferChanges: getNFTokenOfferChanges(tx),
49
+ uritokenChanges: getURITokenChanges(tx),
50
+ uritokenSellOfferChanges: getURITokenSellOfferChanges(tx),
51
+ affectedObjects: getAffectedObjects(tx),
52
+ ammChanges: getAmmChanges(tx),
53
+ didChanges: getDIDChanges(tx),
54
+ oracleChanges: getOracleChanges(tx),
55
+ mptokenIssuanceChanges: getMPTokenIssuanceChanges(tx, nativeCurrency || (0, client_1.getNativeCurrency)()),
56
+ mptokenChanges: getMPTokenChanges(tx, nativeCurrency || (0, client_1.getNativeCurrency)()),
57
+ unlReportChanges: getUNLReportChanges(tx, nativeCurrency || (0, client_1.getNativeCurrency)()),
58
+ hooksExecutions: getHooksExecutions(tx, nativeCurrency || (0, client_1.getNativeCurrency)()),
59
+ emittedTxns: getEmittedTxns(tx, nativeCurrency || (0, client_1.getNativeCurrency)(), definitions),
52
60
  ledgerIndex: tx.ledger_index || tx.inLedger,
53
61
  ledgerVersion: tx.ledger_index || tx.inLedger,
54
62
  indexInLedger: tx.meta.TransactionIndex,
55
63
  deliveredAmount: (0, index_1.parseDeliveredAmount)(tx),
56
64
  });
57
65
  }
66
+ function getBalanceChanges(tx, nativeCurrency) {
67
+ const balanceChanges = (0, index_1.parseBalanceChanges)(tx.meta, nativeCurrency);
68
+ return Object.keys(balanceChanges).length > 0 ? balanceChanges : undefined;
69
+ }
70
+ function getLockedBalanceChanges(tx) {
71
+ if (!ESCROW_TYPES.includes(tx.TransactionType)) {
72
+ return undefined;
73
+ }
74
+ const lockedBalanceChanges = (0, index_1.parseLockedBalanceChanges)(tx.meta);
75
+ return Object.keys(lockedBalanceChanges).length > 0 ? lockedBalanceChanges : undefined;
76
+ }
77
+ function getOrderbookChanges(tx) {
78
+ const orderbookChanges = (0, index_1.parseOrderbookChanges)(tx.meta);
79
+ return Object.keys(orderbookChanges).length > 0 ? orderbookChanges : undefined;
80
+ }
81
+ function getChannelChanges(tx) {
82
+ if (!CHANNEL_TYPES.includes(tx.TransactionType)) {
83
+ return undefined;
84
+ }
85
+ return (0, index_1.parseChannelChanges)(tx.meta);
86
+ }
87
+ function getCheckChanges(tx) {
88
+ if (!CHECK_TYPES.includes(tx.TransactionType)) {
89
+ return undefined;
90
+ }
91
+ return (0, index_1.parseCheckChanges)(tx.meta);
92
+ }
93
+ function getEscrowChanges(tx) {
94
+ if (!ESCROW_TYPES.includes(tx.TransactionType)) {
95
+ return undefined;
96
+ }
97
+ return (0, index_1.parseEscrowChanges)(tx);
98
+ }
99
+ function getAffectedObjects(tx) {
100
+ if (!NFTOKEN_TYPES.includes(tx.TransactionType) && !URITOKEN_TYPES.includes(tx.TransactionType)) {
101
+ return undefined;
102
+ }
103
+ const affectedObjects = (0, index_1.parseAffectedObjects)(tx);
104
+ return affectedObjects ? (0, common_1.removeUndefined)(affectedObjects) : undefined;
105
+ }
106
+ function getNFTokenChanges(tx) {
107
+ if (!NFTOKEN_TYPES.includes(tx.TransactionType)) {
108
+ return undefined;
109
+ }
110
+ const nftokenChanges = (0, index_1.parseNFTokenChanges)(tx);
111
+ return Object.keys(nftokenChanges).length > 0 ? nftokenChanges : undefined;
112
+ }
113
+ function getNFTokenOfferChanges(tx) {
114
+ if (!NFTOKEN_TYPES.includes(tx.TransactionType)) {
115
+ return undefined;
116
+ }
117
+ const nftokenOfferChanges = (0, index_1.parseNFTokenOfferChanges)(tx);
118
+ return Object.keys(nftokenOfferChanges).length > 0 ? nftokenOfferChanges : undefined;
119
+ }
120
+ function getURITokenChanges(tx) {
121
+ if (!URITOKEN_TYPES.includes(tx.TransactionType)) {
122
+ return undefined;
123
+ }
124
+ const uritokenChanges = (0, index_1.parseURITokenChanges)(tx);
125
+ return Object.keys(uritokenChanges).length > 0 ? uritokenChanges : undefined;
126
+ }
127
+ function getURITokenSellOfferChanges(tx) {
128
+ if (!URITOKEN_TYPES.includes(tx.TransactionType)) {
129
+ return undefined;
130
+ }
131
+ const uritokenSellOfferChanges = (0, index_1.parseURITokenSellOfferChanges)(tx);
132
+ return Object.keys(uritokenSellOfferChanges).length > 0 ? uritokenSellOfferChanges : undefined;
133
+ }
134
+ function getHooksExecutions(tx, nativeCurrency) {
135
+ if (nativeCurrency !== "XAH") {
136
+ return undefined;
137
+ }
138
+ return (0, index_1.parseHooksExecutions)(tx);
139
+ }
140
+ function getEmittedTxns(tx, nativeCurrency, definitions) {
141
+ if (nativeCurrency !== "XAH") {
142
+ return undefined;
143
+ }
144
+ return (0, index_1.parseEmittedTxns)(tx, definitions);
145
+ }
146
+ function getAmmChanges(tx) {
147
+ if (!AMM_TYPES.includes(tx.TransactionType)) {
148
+ return undefined;
149
+ }
150
+ const ammChanges = (0, index_1.parseAmmChanges)(tx.meta);
151
+ return ammChanges ? (0, common_1.removeUndefined)(ammChanges) : undefined;
152
+ }
153
+ function getDIDChanges(tx) {
154
+ if (!DID_TYPES.includes(tx.TransactionType)) {
155
+ return undefined;
156
+ }
157
+ const didChanges = (0, index_1.parseDIDChanges)(tx.meta);
158
+ return didChanges ? (0, common_1.removeUndefined)(didChanges) : undefined;
159
+ }
160
+ function getOracleChanges(tx) {
161
+ if (!ORACLE_TYPES.includes(tx.TransactionType)) {
162
+ return undefined;
163
+ }
164
+ const oracleChanges = (0, index_1.parseOracleChanges)(tx.meta);
165
+ return oracleChanges ? (0, common_1.removeUndefined)(oracleChanges) : undefined;
166
+ }
167
+ function getUNLReportChanges(tx, nativeCurrency) {
168
+ if (nativeCurrency !== "XAH") {
169
+ return undefined;
170
+ }
171
+ if (!UNL_REPORT_TYPES.includes(tx.TransactionType)) {
172
+ return undefined;
173
+ }
174
+ return (0, index_1.parseUNLReportChanges)(tx);
175
+ }
176
+ function getMPTokenChanges(tx, nativeCurrency) {
177
+ if (nativeCurrency !== "XRP") {
178
+ return undefined;
179
+ }
180
+ if (!MPTOKEN_TYPES.includes(tx.TransactionType)) {
181
+ return undefined;
182
+ }
183
+ const mptokenChanges = (0, index_1.parseMPTokenChanges)(tx);
184
+ return Object.keys(mptokenChanges).length > 0 ? mptokenChanges : undefined;
185
+ }
186
+ function getMPTokenIssuanceChanges(tx, nativeCurrency) {
187
+ if (nativeCurrency !== "XRP") {
188
+ return undefined;
189
+ }
190
+ const mptokenIssuanceChanges = (0, index_1.parseMPTokenIssuanceChanges)(tx);
191
+ return Object.keys(mptokenIssuanceChanges).length > 0 ? mptokenIssuanceChanges : undefined;
192
+ }
@@ -1,15 +1,32 @@
1
- import { TransactionMetadata } from "xrpl";
1
+ import { Node, TransactionMetadata } from "xrpl";
2
2
  import { IssuedCurrencyAmount, FormattedIssuedCurrencyAmount, FormattedIssuedMPTAmount } from "../types";
3
+ type NormalizedNode = {
4
+ diffType: string;
5
+ entryType: string;
6
+ ledgerIndex: string;
7
+ newFields: {
8
+ [field: string]: unknown;
9
+ };
10
+ finalFields: {
11
+ [field: string]: unknown;
12
+ };
13
+ previousFields: {
14
+ [field: string]: unknown;
15
+ };
16
+ PreviousTxnID?: string;
17
+ PreviousTxnLgrSeq?: number;
18
+ };
3
19
  declare function adjustQualityForXRP(quality: string, takerGetsCurrency: string, takerPaysCurrency: string): string;
4
20
  declare function parseQuality(quality?: number | null): number | undefined;
5
21
  declare function parseTimestamp(rippleTime?: number | null): string | undefined;
6
22
  declare function isPartialPayment(tx: any): boolean;
7
23
  declare function removeGenericCounterparty(amount: IssuedCurrencyAmount | FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount, address: string): FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount;
8
- declare function normalizeNodes(metadata: TransactionMetadata): any[];
24
+ declare function normalizeNode(affectedNode: Node): NormalizedNode;
25
+ declare function normalizeNodes(metadata: TransactionMetadata): NormalizedNode[];
9
26
  declare function hexToString(hex: string | undefined): string | undefined;
10
27
  declare function stringToHex(value: string | undefined): string | undefined;
11
28
  declare function bytesToHex(value: Uint8Array | ArrayBufferLike): string;
12
29
  declare function hexToBytes(value: string): Uint8Array;
13
30
  declare function parseUint32(buf: Buffer, cur: number): string;
14
31
  declare function parseUint64(buf: Buffer, cur: number): string;
15
- export { parseQuality, parseTimestamp, adjustQualityForXRP, isPartialPayment, removeGenericCounterparty, normalizeNodes, hexToString, stringToHex, bytesToHex, hexToBytes, parseUint32, parseUint64, };
32
+ export { NormalizedNode, parseQuality, parseTimestamp, adjustQualityForXRP, isPartialPayment, removeGenericCounterparty, normalizeNodes, normalizeNode, hexToString, stringToHex, bytesToHex, hexToBytes, parseUint32, parseUint64, };
@@ -9,6 +9,7 @@ exports.adjustQualityForXRP = adjustQualityForXRP;
9
9
  exports.isPartialPayment = isPartialPayment;
10
10
  exports.removeGenericCounterparty = removeGenericCounterparty;
11
11
  exports.normalizeNodes = normalizeNodes;
12
+ exports.normalizeNode = normalizeNode;
12
13
  exports.hexToString = hexToString;
13
14
  exports.stringToHex = stringToHex;
14
15
  exports.bytesToHex = bytesToHex;
@@ -1,18 +1,17 @@
1
1
  import { FormattedBaseSpecification } from "./specification";
2
- import { FormattedIssuedCurrencyAmount, FormattedIssuedMPTAmount } from "./amounts";
2
+ import { IssuedCurrencyAmount, FormattedIssuedCurrencyAmount, FormattedIssuedMPTAmount } from "./amounts";
3
3
  import { FormattedSourceAddress, FormattedDestinationAddress } from "./account";
4
4
  export type FormattedCheckCancelSpecification = {
5
5
  checkID: string;
6
6
  } & FormattedBaseSpecification;
7
7
  export type FormattedCheckCashSpecification = {
8
8
  checkID: string;
9
- amount: FormattedIssuedCurrencyAmount;
10
- deliverMin: FormattedIssuedCurrencyAmount;
9
+ amount: IssuedCurrencyAmount | FormattedIssuedCurrencyAmount;
10
+ deliverMin: IssuedCurrencyAmount | FormattedIssuedCurrencyAmount;
11
11
  } & FormattedBaseSpecification;
12
12
  export type FormattedCheckCreateSpecification = {
13
13
  source?: FormattedSourceAddress;
14
14
  destination?: FormattedDestinationAddress;
15
- sendMax: FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount;
15
+ sendMax: IssuedCurrencyAmount | FormattedIssuedCurrencyAmount | FormattedIssuedMPTAmount;
16
16
  expiration?: string;
17
- invoiceID?: string;
18
17
  } & FormattedBaseSpecification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bithomp/xrpl-api",
3
- "version": "3.2.10",
3
+ "version": "3.2.12",
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",
@@ -65,15 +65,15 @@
65
65
  "@eslint/eslintrc": "^3.2.0",
66
66
  "@types/chai": "^5.0.1",
67
67
  "@types/chai-as-promised": "^8.0.1",
68
- "@types/lodash": "^4.17.14",
68
+ "@types/lodash": "^4.17.15",
69
69
  "@types/mocha": "^10.0.10",
70
70
  "@types/nconf": "^0.10.7",
71
- "@types/node": "^22.13.0",
72
- "@typescript-eslint/eslint-plugin": "^8.22.0",
73
- "@typescript-eslint/parser": "^8.22.0",
71
+ "@types/node": "^22.13.1",
72
+ "@typescript-eslint/eslint-plugin": "^8.23.0",
73
+ "@typescript-eslint/parser": "^8.23.0",
74
74
  "chai": "^4.5.0",
75
75
  "chai-as-promised": "^7.1.2",
76
- "eslint": "^9.19.0",
76
+ "eslint": "^9.20.0",
77
77
  "eslint-config-prettier": "^10.0.1",
78
78
  "eslint-plugin-chai-friendly": "^1.0.1",
79
79
  "eslint-plugin-import": "^2.31.0",