Skip to content

Commit 75694a2

Browse files
build(deps): Bump xrpl from 2.13.0 to 4.0.0 (#258)
Bumps [xrpl](https://github.com/XRPLF/xrpl.js) from 2.13.0 to 4.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/XRPLF/xrpl.js/releases">xrpl's releases</a>.</em></p> <blockquote> <h2>[email protected]</h2> <h2>What's Changed</h2> <ul> <li>feat: add rippled API v2 support and use as default by <a href="https://github.com/khancode"><code>@​khancode</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2656">XRPLF/xrpl.js#2656</a></li> <li>Add nfts_by_issuer data type by <a href="https://github.com/Kassaking7"><code>@​Kassaking7</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2694">XRPLF/xrpl.js#2694</a></li> <li>remove references to the hooks testnet faucet in xrpl.js codebase by <a href="https://github.com/ckeshava"><code>@​ckeshava</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2711">XRPLF/xrpl.js#2711</a></li> <li>Aliter: Implement DeliverMax alias in Payment transactions, through autofill method by <a href="https://github.com/ckeshava"><code>@​ckeshava</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2689">XRPLF/xrpl.js#2689</a></li> <li>feat: add support for the <code>fixPreviousTxnID</code> amendment by <a href="https://github.com/mvadari"><code>@​mvadari</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2720">XRPLF/xrpl.js#2720</a></li> <li>feat: add <code>feature</code> RPC by <a href="https://github.com/mvadari"><code>@​mvadari</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2719">XRPLF/xrpl.js#2719</a></li> <li>Add transaction <code>hash</code> to <code>ledger</code> command response by <a href="https://github.com/tequdev"><code>@​tequdev</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2717">XRPLF/xrpl.js#2717</a></li> <li>feat: Upgrade to Node 18 and remove cross-fetch (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2678">#2678</a>) by <a href="https://github.com/ckeshava"><code>@​ckeshava</code></a> <a href="https://github.com/justinr1234"><code>@​justinr1234</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2737">XRPLF/xrpl.js#2737</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Kassaking7"><code>@​Kassaking7</code></a> made their first contribution in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2694">XRPLF/xrpl.js#2694</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/XRPLF/xrpl.js/compare/@xrplf/[email protected]@4.0.0">https://github.com/XRPLF/xrpl.js/compare/<code>@​xrplf/isomorphic</code><code>@​[email protected]</code></a></p> <h2>[email protected]</h2> <h2>What's Changed</h2> <ul> <li>feat: add Price Oracles support by <a href="https://github.com/khancode"><code>@​khancode</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2688">XRPLF/xrpl.js#2688</a></li> <li>rectify the flag name tfNoRippleDirect by <a href="https://github.com/ckeshava"><code>@​ckeshava</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2647">XRPLF/xrpl.js#2647</a></li> <li>fix: get <code>client.requestAll</code> to handle filters better by <a href="https://github.com/mvadari"><code>@​mvadari</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2649">XRPLF/xrpl.js#2649</a></li> <li>additional amm flags are introduced by <a href="https://github.com/ckeshava"><code>@​ckeshava</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2667">XRPLF/xrpl.js#2667</a></li> <li>fix: add missing lsfAMMNode flag by <a href="https://github.com/khancode"><code>@​khancode</code></a> in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2674">XRPLF/xrpl.js#2674</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/ckeshava"><code>@​ckeshava</code></a> made their first contribution in <a href="https://redirect.github.com/XRPLF/xrpl.js/pull/2667">XRPLF/xrpl.js#2667</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/XRPLF/xrpl.js/compare/[email protected]@3.1.0">https://github.com/XRPLF/xrpl.js/compare/[email protected]@3.1.0</a></p> <h2>[email protected]</h2> <h2>What's Changed</h2> <h1><a href="https://github.com/XRPLF/xrpl.js/blob/3.0/MIGRATION.md">Migration Guide</a></h1> <h3>BREAKING CHANGES</h3> <ul> <li>Bump typescript to 5.x</li> <li>Remove Node 14 support</li> <li>Remove <code>crypto</code> polyfills, <code>create-hash</code>, <code>elliptic</code>, <code>hash.js</code>, and their many dependencies in favor of <code>@noble/hashes</code> and <code>@nobel/curves</code></li> <li>Remove <code>bip32</code> and <code>bip39</code> in favor of <code>@scure/bip32</code> and <code>@scure/bip39</code></li> <li>Remove <code>assert</code> dependency. If you were catching <code>AssertionError</code> you need to change to <code>Error</code></li> <li>Configuring a proxy: <ul> <li>Instead of passing various parameters on the <code>ConnectionsOptions</code> you know specify the <code>agent</code> parameter. This object can use be created by libraries such as <code>https-proxy-agent</code> or any that implements the <code>http.Agent</code>.</li> <li>This was changed to both support the latest <code>https-proxy-agent</code> and to remove the need to include the package in bundlers. Tests will still be done using <code>https-proxy-agent</code> and only tested in a node environment which was the only way it was previously supported anyway</li> </ul> </li> <li>Remove <code>BroadcastClient</code> which was deprecated</li> <li>Uses <code>@xrplf/secret-numbers</code> instead of <code>xrpl-secret-numbers</code></li> <li>Improve key algorithm detection. It will now throw Errors with helpful messages</li> <li>Move <code>authorizeChannel</code> from <code>wallet/signer</code> to <code>wallet/authorizeChannel</code> to solve a circular dependency issue.</li> <li>When using a bundler you must remove the mapping of <code>ws</code> to <code>WSWrapper</code>. ex. <code>ws: 'xrpl/dist/npm/client/WSWrapper'</code>. See [../UNIQUE_STEPS](<a href="https://github.com/XRPLF/xrpl.js/blob/HEAD/Unique">https://github.com/XRPLF/xrpl.js/blob/HEAD/Unique</a> Steps) for the new, much smaller, configs.</li> <li><code>Transaction</code> type has been redefined to include all transactions and <code>SubmittableTransaction</code> was created to define the old value. The following functions which only handle transactions to be submitted now use <code>SubmittableTransaction</code>: <ul> <li><code>Client.autofill</code></li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/XRPLF/xrpl.js/commit/275c95752b6cf030b328b9b09a6c2244ffa0b431"><code>275c957</code></a> release: v4.0.0 (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2739">#2739</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/3bc3c2029b8189308b62b58248ad28ec049ea011"><code>3bc3c20</code></a> feat: Upgrade to Node 18 and remove cross-fetch (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2678">#2678</a>) (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2737">#2737</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/c9ef96e0a2af5daa4426d1ac6e2a8c278d8ad99a"><code>c9ef96e</code></a> Add transaction <code>hash</code> to <code>ledger</code> command response (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2717">#2717</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/00f1a6bcdd6db99d250f2e33d120af9b8c6cfbd3"><code>00f1a6b</code></a> feat: add <code>feature</code> RPC (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2719">#2719</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/3858a09e1ff3a33eaf035f92eef56b71b4b6e262"><code>3858a09</code></a> build(deps-dev): bump ts-jest from 29.1.5 to 29.2.0 (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2729">#2729</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/3aaf5261072ba531792e83b892c94f8f94503424"><code>3aaf526</code></a> build(deps): bump ws from 8.17.1 to 8.18.0 (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2730">#2730</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/1460cf50264b5704f231c4b7f02b1fe705934d02"><code>1460cf5</code></a> feat: add support for the <code>fixPreviousTxnID</code> amendment (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2720">#2720</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/7e733c4446b9f2bc80b144bff03d46bdd5c9df93"><code>7e733c4</code></a> build(deps-dev): bump <code>@​types/lodash</code> from 4.17.4 to 4.17.6 (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2718">#2718</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/735ac2eb07dd0e9c1856adb80d5d35e467c4da2c"><code>735ac2e</code></a> build(deps): bump <code>@​noble/curves</code> from 1.4.0 to 1.4.2 (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2723">#2723</a>)</li> <li><a href="https://github.com/XRPLF/xrpl.js/commit/c79a5db8f203374e402feb9b0b9e9c0797494b71"><code>c79a5db</code></a> build(deps-dev): bump typedoc from 0.26.2 to 0.26.3 (<a href="https://redirect.github.com/XRPLF/xrpl.js/issues/2722">#2722</a>)</li> <li>Additional commits viewable in <a href="https://github.com/XRPLF/xrpl.js/compare/[email protected]@4.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=xrpl&package-manager=npm_and_yarn&previous-version=2.13.0&new-version=4.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Phu Pham <[email protected]> Co-authored-by: pdp2121 <[email protected]>
1 parent 801d293 commit 75694a2

File tree

8 files changed

+201
-341
lines changed

8 files changed

+201
-341
lines changed

package-lock.json

Lines changed: 188 additions & 302 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"pg": "8.12.0",
7272
"ripple-address-codec": "^5.0.0",
7373
"ws": "^8.13.0",
74-
"xrpl": "^2.13.0",
74+
"xrpl": "^4.0.0",
7575
"xrpl-validator-domains": "0.1.0"
7676
},
7777
"directories": {

src/connection-manager/connections.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable max-lines-per-function -- Disable for this file with complex websocket rules. */
22
import WebSocket from 'ws'
33
import { LedgerEntryResponse } from 'xrpl'
4+
import { LedgerResponseExpanded } from 'xrpl/dist/npm/models/methods/ledger'
45

56
import {
67
query,
@@ -9,7 +10,7 @@ import {
910
getNetworks,
1011
} from '../shared/database'
1112
import { fetchAmendmentInfo } from '../shared/database/amendments'
12-
import { FeeVote, LedgerResponseCorrected } from '../shared/types'
13+
import { FeeVote } from '../shared/types'
1314
import logger from '../shared/utils/logger'
1415

1516
import {
@@ -92,7 +93,7 @@ async function setHandlers(
9293
)
9394
} else if (data.result?.ledger && isInitialNode) {
9495
void handleWsMessageLedgerEnableAmendments(
95-
data as LedgerResponseCorrected,
96+
data as LedgerResponseExpanded,
9697
networks,
9798
)
9899
} else {

src/connection-manager/wsHandling.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
rippleTimeToUnixTime,
88
} from 'xrpl'
99
import { AMENDMENTS_ID } from 'xrpl/dist/npm/models/ledger'
10+
import { LedgerResponseExpanded } from 'xrpl/dist/npm/models/methods/ledger'
1011

1112
import {
1213
query,
@@ -18,7 +19,6 @@ import {
1819
AmendmentStatus,
1920
DatabaseValidator,
2021
FeeVote,
21-
LedgerResponseCorrected,
2222
StreamLedger,
2323
StreamManifest,
2424
ValidationRaw,
@@ -186,7 +186,7 @@ export async function handleWsMessageLedgerEntryAmendments(
186186
* @param networks - The networks of the WebSocket node.
187187
*/
188188
export async function handleWsMessageLedgerEnableAmendments(
189-
data: LedgerResponseCorrected,
189+
data: LedgerResponseExpanded,
190190
networks: string | undefined,
191191
): Promise<void> {
192192
if (!networks || !data.result.ledger.transactions) {
@@ -274,7 +274,7 @@ async function backtrackNetworkAmendmentStatus(
274274
})
275275

276276
await handleWsMessageLedgerEnableAmendments(
277-
ledger as LedgerResponseCorrected,
277+
ledger as LedgerResponseExpanded,
278278
network,
279279
)
280280
}

src/shared/types/index.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
import {
2-
LedgerBinary,
3-
LedgerResponse,
4-
PseudoTransaction,
5-
Transaction,
6-
TransactionMetadata,
7-
} from 'xrpl'
8-
import { Ledger as LedgerXRPL } from 'xrpl/dist/npm/models/ledger'
91
import { Manifest, StreamManifest } from 'xrpl-validator-domains'
102

113
interface Chain {
@@ -37,25 +29,6 @@ interface StreamLedger {
3729
type: string
3830
}
3931

40-
// TODO: use xrpl LedgerResponse type once hash and date has been added to transactions in the response.
41-
interface LedgerCorrected extends LedgerXRPL {
42-
transactions: Array<
43-
(Transaction | PseudoTransaction) & {
44-
metaData?: TransactionMetadata
45-
hash: string
46-
}
47-
>
48-
}
49-
50-
interface LedgerResponseCorrected extends LedgerResponse {
51-
result: {
52-
ledger: LedgerCorrected | LedgerBinary
53-
} & Pick<
54-
LedgerResponse['result'],
55-
Exclude<keyof LedgerResponse['result'], 'ledger'>
56-
>
57-
}
58-
5932
interface AmendmentEnabled {
6033
amendment_id: string
6134
networks: string
@@ -267,7 +240,6 @@ export {
267240
StreamLedger,
268241
Chain,
269242
ValidatorKeys,
270-
LedgerResponseCorrected,
271243
AmendmentStatus,
272244
AmendmentInfo,
273245
}

test/connections/amendment.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { LedgerResponseExpanded } from 'xrpl/dist/npm/models/methods/ledger'
2+
13
import { handleWsMessageLedgerEnableAmendments } from '../../src/connection-manager/wsHandling'
24
import { destroy, query, setupTables } from '../../src/shared/database'
3-
import { LedgerResponseCorrected } from '../../src/shared/types'
45

56
import ledgerResponseNoFlag from './fixtures/ledgerWithNoFlag.json'
67
import ledgerResponseGotMajority from './fixtures/ledgerWithTfMajority.json'
@@ -26,7 +27,7 @@ describe('Amendments', () => {
2627

2728
test('Correctly finds EnableAmendment tx with tfGotMajority Flag (eta available) from ledger response', async () => {
2829
await handleWsMessageLedgerEnableAmendments(
29-
ledgerResponseGotMajority as LedgerResponseCorrected,
30+
ledgerResponseGotMajority as LedgerResponseExpanded,
3031
'main',
3132
)
3233

@@ -47,7 +48,7 @@ describe('Amendments', () => {
4748

4849
test('Correctly finds EnableAmendment tx with No Flag (amendment has been enabled) from ledger response', async () => {
4950
await handleWsMessageLedgerEnableAmendments(
50-
ledgerResponseNoFlag as LedgerResponseCorrected,
51+
ledgerResponseNoFlag as LedgerResponseExpanded,
5152
'main',
5253
)
5354

test/connections/fixtures/ledgerWithNoFlag.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"close_time_resolution": 10,
1212
"closed": true,
1313
"ledger_hash": "FFAF101AF5FDAA24950BAFDD639947CB44C838E9F67FABE77E1A21EA4BD8C2B0",
14-
"ledger_index": "84206081",
14+
"ledger_index": 84206081,
1515
"parent_close_time": 754411462,
1616
"parent_hash": "55A44DCA100865307B6751D508E1766CB285F9559BADF9A261DF11CF9DA23126",
1717
"total_coins": "99988187080224306",

test/connections/fixtures/ledgerWithTfMajority.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"close_time_resolution": 10,
1212
"closed": true,
1313
"ledger_hash": "040103C742D29BE5DF25EFFB2B0BB4AC3F263D989D2F02FDF157A07E01650A9A",
14-
"ledger_index": "85517825",
14+
"ledger_index": 85517825,
1515
"parent_close_time": 759508320,
1616
"parent_hash": "32540158F82A25967041B14786357879CF43C982D34182464111108DA4DBD412",
1717
"total_coins": "99987946023223668",

0 commit comments

Comments
 (0)