mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 13:05:49 +00:00
Compare commits
5 Commits
main-xahau
...
ripple-lib
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a53f6132e | ||
|
|
acac2ee842 | ||
|
|
6e0ab9e68f | ||
|
|
46eb872774 | ||
|
|
14089a05ad |
164
APPLICATIONS.md
164
APPLICATIONS.md
@@ -1,163 +1 @@
|
||||
# Applications using ripple-lib (RippleAPI)
|
||||
|
||||
A curated list of some of the projects and apps that leverage `ripple-lib` in some way.
|
||||
|
||||
**Have one to add?** Please edit this file and open a PR!
|
||||
|
||||
## Notice (disclaimer)
|
||||
|
||||
These sites are independent of Ripple and have not been authorized, endorsed, sponsored or otherwise approved by Ripple or its affiliates.
|
||||
|
||||
Warning: Use at your own risk.
|
||||
|
||||
## Exchanges
|
||||
|
||||
- **[The World Exchange](https://www.theworldexchange.net/)**
|
||||
|
||||
Trade, issue, and send directly on the XRP Ledger. A user interface for the XRPL's decentralized exchange.
|
||||
|
||||
- **[Bitso](https://bitso.com/)**
|
||||
|
||||
Exchange allowing clients to buy and sell XRP, based in Mexico.
|
||||
|
||||
## Explorers
|
||||
|
||||
- **[xrpintel - XRP Intelligence](https://xrpintel.com/)**
|
||||
|
||||
Monitor the XRP Network in real time and explore historical statistics.
|
||||
|
||||
- **[XRP Charts](https://xrpcharts.ripple.com/)** (xrpcharts.ripple.com)
|
||||
|
||||
XRP Charts provides information based on public data, including trade volume, top markets, metrics, transactions, and more.
|
||||
|
||||
- **[Ripple Live](https://gatehub.net/live)** (gatehub.net/live)
|
||||
|
||||
Visualize XRP network transactions.
|
||||
|
||||
- **[XRPL Dev. Dashboard](https://xrp.fans/)** (xrp.fans)
|
||||
|
||||
Debugging dashboard for `rippled-ws-client-pool`, transaction and query explorer, and transaction signing and submission tool.
|
||||
|
||||
- **[XRP Value](http://xrpvalue.com/)**
|
||||
|
||||
Real-time XRP price, trades, and orderbook data from the XRP Ledger.
|
||||
|
||||
- **[Bithomp - XRP Explorer](https://bithomp.com/explorer/)**
|
||||
|
||||
Look up information by entering an address, transaction hash, username, or PayID.
|
||||
|
||||
- **[Bithomp - XRPL validators](https://bithomp.com/validators)**
|
||||
|
||||
List of XRPL validators, nodes, and testnet validators.
|
||||
|
||||
- **[XRP Scan - XRP Ledger explorer](https://xrpscan.com)**
|
||||
|
||||
XRP Ledger explorer, metrics and analytics.
|
||||
|
||||
- **[xrplorer](https://xrplorer.com)**
|
||||
|
||||
XRP Ledger explorer, API, metrics, and analytics using a graph database that is synchronized live with the XRPL.
|
||||
|
||||
## Data monitoring
|
||||
|
||||
- **[zerptracker](https://zerptracker.com)**
|
||||
|
||||
Monitor the XRPL using powerful JSONPath expressions, and receive notifications via email, SMS, webhooks, and more.
|
||||
|
||||
- **[Utility-Scan](https://utility-scan.com)**
|
||||
|
||||
Attempts to detect RippleNet on-demand liquidity (ODL) transactions through known fiat corridors and report these transactions in real time.
|
||||
|
||||
- **[XRPL Rosetta](https://xrpl-rosetta-oepox.ondigitalocean.app)**
|
||||
|
||||
3D Globe written in three.js connected to a Node.js websocket server that is listening to exchanges and the XRPL. The visualization aims to show trading, ODL, and liquidity at exchanges, intra-exchange volume, and flows.
|
||||
|
||||
## Wallets and wallet tools
|
||||
|
||||
- **[XUMM](https://xumm.app/)**
|
||||
|
||||
Users can use the xumm application to track their accounts, balances and transactions. The true power of xumm is the platform available for developers.
|
||||
|
||||
- **[Xpring Wallet](https://xpring.io)** (uses `ripple-keypairs`)
|
||||
|
||||
Non-custodial XRP wallet.
|
||||
|
||||
- **[XRP Toolkit](https://www.xrptoolkit.com)**
|
||||
|
||||
A web interface to the XRP Ledger, supporting both hardware and software wallets.
|
||||
|
||||
- **[Toast Wallet](https://toastwallet.com/)**
|
||||
|
||||
A free, open source XRP Wallet for iOS, Android, Windows, Mac and Linux.
|
||||
|
||||
- **[Toastify Ledger](https://github.com/WietseWind/toastify-ledger)** (uses `ripple-keypairs`)
|
||||
|
||||
Add a Regular Key to a mnemonic XRP Wallet (e.g. Ledger Nano S) to use the account with a Family Seed (secret).
|
||||
|
||||
- **[Bithomp-submit](https://github.com/Bithomp/bithomp-submit)** (GitHub)
|
||||
|
||||
A tool to submit an offline-signed XRPL transaction.
|
||||
|
||||
- **[Kyte](https://kyteapp.co/)** (kyteapp.co) ([Source](https://github.com/WietseWind/Zerp-Wallet)) (Deprecated)
|
||||
|
||||
Web-based XRP wallet.
|
||||
|
||||
- **[XRP Vanity Address Generator](https://github.com/WietseWind/xrp-vanity-generator)** (Node.js)
|
||||
|
||||
A vanity address is a wallet address containing a few characters you like at the beginning or the end of the wallet address.
|
||||
|
||||
- **[XRP Account Mnemonic Recovery](https://github.com/WietseWind/xrp-mnemonic-recovery)** (uses `ripple-keypairs`)
|
||||
|
||||
Recover a 24 word mnemonic if one word is wrong or one word is missing.
|
||||
|
||||
## Send and request payments
|
||||
|
||||
- **[XRP Tip Bot](https://www.xrptipbot.com/)**
|
||||
|
||||
A bot that enables users on reddit, Twitter and Discord to send XRP to each other through reddit comments and Twitter tweets.
|
||||
|
||||
- **[XRP Text](https://xrptext.com/)**
|
||||
|
||||
Send XRP using SMS text messages.
|
||||
|
||||
- **[XRParrot](https://xrparrot.com/)** (uses `ripple-address-codec`)
|
||||
|
||||
Easy EUR (SEPA) to XRP transfer (currency conversion).
|
||||
|
||||
- **[XRP Payment](https://xrpayments.co/)** (xrpayments.co)
|
||||
|
||||
Tool for generating a XRP payment request URI in a QR code, with currency converter.
|
||||
|
||||
## Development tools
|
||||
|
||||
- **[XRP Faucets for Testnet and Devnet](https://xrpl.org/xrp-testnet-faucet.html)**
|
||||
|
||||
Get some test funds for development on the test network. The faucet uses `ripple-lib`.
|
||||
|
||||
## Code samples and libraries
|
||||
|
||||
- **[ilp-plugin-xrp-paychan](https://github.com/interledgerjs/ilp-plugin-xrp-paychan)**
|
||||
|
||||
Send ILP payments using XRP and payment channels (PayChan).
|
||||
|
||||
- **[RunKit: WietseWind](https://runkit.com/wietsewind/)**
|
||||
|
||||
XRP Ledger code samples for Node.js.
|
||||
|
||||
- **[GitHub Gist: WietseWind](https://gist.github.com/WietseWind)**
|
||||
|
||||
XRP Ledger code samples for Node.js and the web (mostly).
|
||||
|
||||
- **[rippled-ws-client-sign](https://github.com/WietseWind/rippled-ws-client-sign)**
|
||||
|
||||
Sign transactions, with support for MultiSign.
|
||||
|
||||
- **[ILP-enabled power switch](https://xrpcommunity.blog/raspberry-pi-interledger-xp-powerswitch-howto/)** ([video](https://www.youtube.com/watch?v=c-eS0HQUuJg)) (uses [`moneyd-uplink-xrp`](https://github.com/interledgerjs/moneyd-uplink-xrp))
|
||||
|
||||
For about $30 in parts (Raspberry Pi, 3.3V Relay board and a few wires) you can build your own power switch that will switch on if a streaming ILP payment comes in. When the payment stream stops, the power turns off.
|
||||
|
||||
## Related apps that do not appear to use ripple-lib
|
||||
|
||||
- **[XRP Stats](https://ledger.exposed/)** (ledger.exposed)
|
||||
|
||||
Rich list, live ledger stats and XRP distribution. Visualize escrows and flow of funds.
|
||||
# [Moved to xrpl.js](https://github.com/XRPLF/xrpl.js/blob/main/APPLICATIONS.md)
|
||||
16
HISTORY.md
16
HISTORY.md
@@ -1,6 +1,20 @@
|
||||
# ripple-lib Release History
|
||||
|
||||
Subscribe to [the **ripple-lib-announce** mailing list](https://groups.google.com/forum/#!forum/ripple-lib-announce) for release announcements. We recommend that ripple-lib users stay up-to-date with the latest stable release.
|
||||
# Deprecation Notice
|
||||
|
||||
This library (ripple-lib 1.x) has been deprecated in favor of [xrpl.js version 2+](https://github.com/XRPLF/xrpl.js).
|
||||
|
||||
## 1.10.1 (2022-05-31)
|
||||
|
||||
* Fix bug in parseSettings: AffectedNodes can contain CreatedNode and DeletedNode ([#1907](https://github.com/XRPLF/xrpl.js/pull/1907))
|
||||
|
||||
The SHA-256 checksums for the browser version of this release can be found below.
|
||||
```
|
||||
% shasum -a 256 build/*
|
||||
368ad4fe29bfeee7dd59e319eded72d486f57a2c05a2314d9e5c42db1fd70fcd build/ripple-latest-min.js
|
||||
f8328b2b687757112b63675b1af272ee08bea15df2a392d1c50637604e938a22 build/ripple-latest-min.js.LICENSE.txt
|
||||
2631590b53ddee9a68cb4149af07b20a1135606a8b5d3d746594359e003411d4 build/ripple-latest.js
|
||||
```
|
||||
|
||||
## 1.10.0 (2021-08-12)
|
||||
|
||||
|
||||
25
README.md
25
README.md
@@ -1,18 +1,18 @@
|
||||
## Deprecated
|
||||
|
||||
This library (ripple-lib 1.x) has been deprecated in favor of [xrpl.js version 2+](https://github.com/XRPLF/xrpl.js).
|
||||
|
||||
# ripple-lib (RippleAPI)
|
||||
|
||||
A JavaScript/TypeScript API for interacting with the XRP Ledger
|
||||
|
||||
[](https://www.npmjs.org/package/ripple-lib)
|
||||
|
||||
This is the recommended library for integrating a JavaScript/TypeScript app with the XRP Ledger, especially if you intend to use advanced functionality such as IOUs, payment paths, the decentralized exchange, account settings, payment channels, escrows, multi-signing, and more.
|
||||
This library is for integrating a JavaScript/TypeScript app with the XRP Ledger and supports functionality such as IOUs, payment paths, the decentralized exchange, account settings, payment channels, escrows, multi-signing, and more.
|
||||
|
||||
## [➡️ Reference Documentation](https://xrpl.org/rippleapi-reference.html)
|
||||
## [➡️ Reference Documentation](https://github.com/XRPLF/xrpl.js/blob/1.x/docs/index.md)
|
||||
|
||||
See the full reference documentation on the XRP Ledger Dev Portal.
|
||||
|
||||
## [➡️ Applications and Projects](APPLICATIONS.md)
|
||||
|
||||
What is ripple-lib used for? The applications on the list linked above use `ripple-lib`. Open a PR to add your app or project to the list!
|
||||
Use the above link to view the full reference documentation.
|
||||
|
||||
### Features
|
||||
|
||||
@@ -103,12 +103,13 @@ import ripple from 'https://dev.jspm.io/npm:ripple-lib';
|
||||
+ [RippleAPI Beginners Guide](https://xrpl.org/get-started-with-rippleapi-for-javascript.html)
|
||||
+ [RippleAPI Full Reference Documentation](https://xrpl.org/rippleapi-reference.html) ([in this repo](https://github.com/ripple/ripple-lib/blob/develop/docs/index.md))
|
||||
+ [Code Samples](https://github.com/ripple/ripple-lib/tree/develop/docs/samples)
|
||||
+ [XRP Ledger Dev Portal](https://xrpl.org/)
|
||||
|
||||
### Mailing Lists
|
||||
|
||||
We have a low-traffic mailing list for announcements of new ripple-lib releases. (About 1 email per week)
|
||||
|
||||
+ [Subscribe to ripple-lib-announce](https://groups.google.com/forum/#!forum/ripple-lib-announce)
|
||||
+ [Subscribe to xrpl-announce](https://groups.google.com/g/xrpl-announce)
|
||||
|
||||
If you're using the XRP Ledger in production, you should run a [rippled server](https://github.com/ripple/rippled) and subscribe to the ripple-server mailing list as well.
|
||||
|
||||
@@ -146,11 +147,3 @@ Do not edit `./docs/index.md` directly because it is a generated file.
|
||||
Instead, edit the appropriate `.md.ejs` files in `./docs/src/`.
|
||||
|
||||
If you make changes to the JSON schemas, fixtures, or documentation sources, update the documentation by running `yarn run docgen`.
|
||||
|
||||
## More Information
|
||||
|
||||
+ [ripple-lib-announce mailing list](https://groups.google.com/forum/#!forum/ripple-lib-announce) - subscribe for release announcements
|
||||
+ [RippleAPI Reference](https://xrpl.org/rippleapi-reference.html) - XRP Ledger Dev Portal
|
||||
+ [XRP Ledger Dev Portal](https://xrpl.org/)
|
||||
|
||||
[](https://travis-ci.org/ripple/ripple-lib)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "xrpl",
|
||||
"version": "1.10.0",
|
||||
"name": "ripple-lib",
|
||||
"version": "1.10.1",
|
||||
"license": "ISC",
|
||||
"description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
|
||||
"description": "Deprecated - consider migrating to xrpl.js: https://xrpl.org/xrpljs2-migration-guide.html",
|
||||
"files": [
|
||||
"dist/npm/*",
|
||||
"build/ripple-latest-min.js",
|
||||
|
||||
@@ -5,9 +5,7 @@ const AccountFlags = constants.AccountFlags
|
||||
import parseFields from './fields'
|
||||
|
||||
function getAccountRootModifiedNode(tx: any) {
|
||||
const modifiedNodes = tx.meta.AffectedNodes.filter(
|
||||
(node) => node.ModifiedNode.LedgerEntryType === 'AccountRoot'
|
||||
)
|
||||
const modifiedNodes = tx.meta.AffectedNodes.filter(node => node.ModifiedNode?.LedgerEntryType === 'AccountRoot');
|
||||
assert.ok(modifiedNodes.length === 1)
|
||||
return modifiedNodes[0].ModifiedNode
|
||||
}
|
||||
|
||||
91
test/fixtures/rippled/account-set-with-deleted-node.json
vendored
Normal file
91
test/fixtures/rippled/account-set-with-deleted-node.json
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"id": 1,
|
||||
"result": {
|
||||
"Account": "rsCpncqURaTmiaCy4yWaGb17xLioBPVMiN",
|
||||
"Fee": "10000",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 169578503,
|
||||
"Memos": [
|
||||
{
|
||||
"Memo": {
|
||||
"MemoData": "2265794A68624763694F694A46557A49314E694973496E523563434936496B705856434A392E65794A6A5957356A5A5778735A575266633246735A56397A5A5846315A57356A5A5349364E6A6B304D5441314D7A6373496D4E31636E4A6C626D4E35496A6F694D44497A4D444D784E544532524455794E7A59324E6A52464E4459314E444D344D7A597A4D544D344D7A51774D4441774D4441774D434973496D6C7A6333566C63694936496E497A59314E36635568574D31685252546836556A6468656C6831576D4E57536D6F7961336C71595556314E4649694C434A70595851694F6A45324E4451304D546B774E6A4973496D6C7A63794936496C4E766247396E5A57357059794247623356755A47463061573975496E302E4B6E7A4A4A414B716E4E6473576E4A67734D4434384472375A2D543641467131335A4B5F633732427231596666706C56345962677A423864414156757455454864626262713535375A6C304F35554E5F696F4E56485122"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Memo": {
|
||||
"MemoData": "64386231366631342D363630322D343362312D383438342D633739663866363236383639"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Sequence": 0,
|
||||
"SigningPubKey": "03CDAA7E59BE32A0CF6DC60D94A428B962CB5318CFDE7B504BFA097A421417CF90",
|
||||
"TicketSequence": 69410537,
|
||||
"TransactionType": "AccountSet",
|
||||
"TxnSignature": "3045022100F02A5233BEE411C212DA03342228BB60D814CDE6CE2FAA5590773C15753A1696022077FEDDA19B340674D69AB549E02BBD9449D26CABCADD09A4081205BECA32B959",
|
||||
"date": 697734282,
|
||||
"hash": "7CD33D44FD0474B4598186A9C6BCD7905DAD717CD69934A5DD1C571619BD1169",
|
||||
"inLedger": 69578408,
|
||||
"ledger_index": 69578408,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"Owner": "rsCpncqURaTmiaCy4yWaGb17xLioBPVMiN",
|
||||
"RootIndex": "3F6D7C06CECD8300A89F10D60DEE8B0B50A0C9D0459CE322B8087749BCF24537"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "6E6E7D74CA255FC5DAD0A2A5B1127F7E42472AB526B5CD59B6815EE9ADCED6E5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rsCpncqURaTmiaCy4yWaGb17xLioBPVMiN",
|
||||
"Balance": "94106875",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 38,
|
||||
"Sequence": 69410538,
|
||||
"TicketCount": 2
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "B90A7CFC5D00A25F147686FFED98841B7D30DEBD95C4B6F333088E7F14FB23AD",
|
||||
"PreviousFields": {
|
||||
"Balance": "94116875",
|
||||
"OwnerCount": 39,
|
||||
"TicketCount": 3
|
||||
},
|
||||
"PreviousTxnID": "8F598717167B0357644DC0BBF5A116CDC23E7F4E3D69CD73A147DBBA55B1C790",
|
||||
"PreviousTxnLgrSeq": 69578340
|
||||
}
|
||||
},
|
||||
{
|
||||
"DeletedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rsCpncqURaTmiaCy4yWaGb17xLioBPVMiN",
|
||||
"Flags": 0,
|
||||
"OwnerNode": "1",
|
||||
"PreviousTxnID": "8F598717167B0357644DC0BBF5A116CDC23E7F4E3D69CD73A147DBBA55B1C790",
|
||||
"PreviousTxnLgrSeq": 69578340,
|
||||
"TicketSequence": 69410537
|
||||
},
|
||||
"LedgerEntryType": "Ticket",
|
||||
"LedgerIndex": "F0BD623DBD0AA7BF134104B4F4D8ACC31ACBE773463F0F20D53DD774A6F51469"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 25,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"validated": true,
|
||||
"warnings": [
|
||||
{
|
||||
"id": 1004,
|
||||
"message": "This is a reporting server. The default behavior of a reporting server is to only return validated data. If you are looking for not yet validated data, include \"ledger_index : current\" in your request, which will cause this server to forward the request to a p2p node. If the forward is successful the response will include \"forwarded\" : \"true\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
12
test/settings.ts
Normal file
12
test/settings.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import assert from 'assert-diff'
|
||||
import accountSetWithDeletedNode from './fixtures/rippled/account-set-with-deleted-node.json'
|
||||
import parseSettings from '../src/ledger/parse/settings'
|
||||
|
||||
describe('Settings unit tests', function () {
|
||||
it('parseSettings does not error with DeletedNode', function () {
|
||||
assert.deepStrictEqual(
|
||||
parseSettings(accountSetWithDeletedNode.result),
|
||||
{}
|
||||
)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user