feat: Upgrade to Node 18 and remove cross-fetch (#2678) (#2737)

* feat: Upgrade to Node 18 and remove cross-fetch (#2678)

BREAKING CHANGE: fetch now relies on the native javascript environment in browsers and node.js

Co-authored-by: justinr1234 <justinr1234@gmail.com>
This commit is contained in:
Chenna Keshava B S
2024-07-16 11:04:47 -07:00
committed by GitHub
parent c9ef96e0a2
commit 3bc3c2029b
12 changed files with 1559 additions and 14677 deletions

View File

@@ -19,13 +19,13 @@ See the full reference documentation for all classes, methods, and utilities.
4. Subscribing to changes in the ledger ([Ex. ledger, transactions, & more...](https://xrpl.org/subscribe.html))
5. Parsing ledger data into more convenient formats ([`xrpToDrops`](https://js.xrpl.org/functions/xrpToDrops.html) and [`rippleTimeToISOTime`](https://js.xrpl.org/functions/rippleTimeToISOTime.html))
All of which works in Node.js (tested for v16+) & web browsers (tested for Chrome).
All of which works in Node.js (tested for v18+) & web browsers (tested for Chrome).
# Quickstart
### Requirements
+ **[Node.js v16](https://nodejs.org/)** is recommended. We also support v18 and v20. Other versions may work but are not frequently tested.
+ **[Node.js v18](https://nodejs.org/)** is recommended. We also support v20. Other versions may work but are not frequently tested.
### Installing xrpl.js
@@ -56,7 +56,7 @@ async function main() {
});
console.log(response);
client.disconnect();
await client.disconnect();
}
main();
```