Skip to content

Commit 8205b4f

Browse files
authored
Merge branch 'master' into xls-21d
2 parents 75aec9d + 389257d commit 8205b4f

File tree

64 files changed

+6268
-2382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+6268
-2382
lines changed

.github/dependabot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Dependabot configuration for keeping dependencies updated
2+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
4+
version: 2
5+
updates:
6+
# Python dependencies (requirements.txt)
7+
- package-ecosystem: "pip"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
day: "monday"
12+
time: "09:00"
13+
open-pull-requests-limit: 5
14+
reviewers:
15+
- "mvadari"
16+
- "intelliot"
17+
commit-message:
18+
prefix: "deps"
19+
include: "scope"
20+
21+
# GitHub Actions dependencies
22+
- package-ecosystem: "github-actions"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
26+
day: "monday"
27+
time: "09:00"
28+
open-pull-requests-limit: 5
29+
reviewers:
30+
- "mvadari"
31+
- "intelliot"
32+
commit-message:
33+
prefix: "ci"
34+
include: "scope"

.github/workflows/deploy.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy XLS Standards to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
if: github.repository == 'XRPLF/XRPL-Standards'
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.11"
29+
30+
- name: Cache Python dependencies
31+
uses: actions/cache@v4
32+
id: cache-deps
33+
with:
34+
path: ~/.cache/pip
35+
key: ${{ runner.os }}-pip-${{ hashFiles('**/site/requirements.txt') }}
36+
restore-keys: |
37+
${{ runner.os }}-pip-
38+
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install -r site/requirements.txt
43+
44+
- name: Build site
45+
run: python site/build_site.py
46+
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v5
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v4
52+
with:
53+
path: "site/_site"
54+
55+
deploy:
56+
if: github.repository == 'XRPLF/XRPL-Standards'
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
prettier:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v5
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "24"
20+
21+
- name: Install dependencies
22+
run: npm install -g prettier
23+
24+
- name: Run Prettier
25+
run: npx prettier --check .

.github/workflows/validate-xls.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Validate XLS Documents
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
validate-xls:
11+
runs-on: ubuntu-latest
12+
name: Validate XLS Document Parsing
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v5
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.11"
22+
23+
- name: Cache Python dependencies
24+
id: cache-deps
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.cache/pip
28+
key: ${{ runner.os }}-pip-${{ hashFiles('**/site/requirements.txt') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -r site/requirements.txt
36+
37+
- name: Validate XLS document parsing
38+
run: |
39+
echo "Running XLS document validation..."
40+
python site/xls_parser.py
41+
42+
- name: Report validation results
43+
if: always()
44+
run: |
45+
echo "XLS validation completed"
46+
echo "This pipeline validates that all XLS documents can be parsed correctly"
47+
echo "If this fails, it indicates issues with XLS document formatting or metadata"

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
.DS_Store
22
/.idea
3+
_site/
4+
5+
# Python cache files
6+
__pycache__/
7+
*.pyc
8+
*.pyo

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: mixed-line-ending
8+
- id: check-merge-conflict
9+
args: [--assume-in-merge]
10+
11+
- repo: https://github.com/rbubley/mirrors-prettier
12+
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
13+
hooks:
14+
- id: prettier

CONTRIBUTING.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# CONTRIBUTING
22

3-
The work of the [XRP Ledger](https://xrpl.org) community is open, collaborative, and welcoming of all contributors participating in good faith. Part of that effort involves standardization, and this document outlines how anyone can contribute to that process.
3+
The work of the [XRP Ledger](https://xrpl.org) community is open, collaborative, and welcoming of all contributors participating in good faith. Part of that effort involves standardization, and this document outlines how anyone can contribute to that process.
44

55
## Licensing
6-
Any XRPL Standards document can be referred to interchangeably as an "XLS", "XRPL Standard", or "document". Copyright on all content is subject to the terms of this [license](LICENSE), and all contributors grant everyone a royalty-free license to use their contributions, including the following grants:
6+
7+
Any XRPL Standards document can be referred to interchangeably as an "XLS", "XRPL Standard", or "document". Copyright on all content is subject to the terms of this [license](LICENSE), and all contributors grant everyone a royalty-free license to use their contributions, including the following grants:
78

89
- Copyright: a royalty-free license to anyone to use any contributions submitted to this repository.
910
- Patent: a commitment to license on a royalty-free basis any essential patent claims relating to any contributions in this repository.
@@ -15,14 +16,16 @@ Any XRPL Standards document can be referred to interchangeably as an "XLS", "XRP
1516
Before opening a PR with any kind of formal proposal, please first gather community input by starting a [Discussion](https://github.com/XRPLF/XRPL-Standards/discussions). Discussions are suitable for early work-in-progress: ask, suggest, add, and make sweeping changes. Collecting such feedback helps to refine your concept, and is required in order to move forward in the specification process.
1617

1718
#### Discussion Title
19+
1820
When creating a new discussion for your idea, the discussion title should follow the naming convention `XLS-{0000}d {Title}`, where `{0000}` is a unique number for the XLS, `d` indicates that the document is a Draft (i.e., work in progress), and `{Title}` is a descriptive title for the proposed document.
1921

2022
#### Specification Number
23+
2124
Use the next number that has not yet been used. If a conflict occurs, it will be fixed by a maintainer or editor. Maintainers or editors also reserve the right to remove or re-number proposals as necessary. The number is important, as it will be used to reference features and ideas throughout the community.
2225

2326
### 2. Closing a Discussion
2427

25-
When a discussion has produced a well-refined standard, authors should post a comment to the discussion noting that the discussion will be closed in a few days. This allows time (for those engaged with the discussion) to submit final commentary.
28+
When a discussion has produced a well-refined standard, authors should post a comment to the discussion noting that the discussion will be closed in a few days. This allows time (for those engaged with the discussion) to submit final commentary.
2629

2730
Once this waiting period has elapsed, the standard's author may close the discussion from further comment, and then move the discussion to a [**specification pull request**](#3-specification-pull-requests) to add the standard into the repository as a markdown file (see below for specification formats).
2831

@@ -32,7 +35,7 @@ The intention of this workflow is that the discussion be closed from further com
3235

3336
### 3. Specification Pull Requests
3437

35-
When opening a specification PR, there are two document types: *Drafts* and *Candidate Specifications*. The type and status of any particular document has no bearing on the priority of that document. Typically, the further along in the process, the more likely it is that any particular XLS will be implemented or adopted.
38+
When opening a specification PR, there are two document types: _Drafts_ and _Candidate Specifications_. The type and status of any particular document has no bearing on the priority of that document. Typically, the further along in the process, the more likely it is that any particular XLS will be implemented or adopted.
3639

3740
#### Drafts
3841

@@ -66,7 +69,6 @@ Refinements in detail are still allowed and recommended. For example, you can cl
6669

6770
When a Draft is considered stable, there is a call for review from the community to publish the document as a Candidate Specification by making a PR to remove the `d` from the document folder name and update the `type` to `candidate-specification`.
6871

69-
7072
Once published as a Candidate Specification, no further substantive changes are allowed under the same XLS number.
7173

7274
For Specifications that require changes or implementation in the XRP Ledger server software and protocol, the Candidate Specification cannot be published until the relevant change has been merged into [the software's `master` branch](https://github.com/XRPLF/rippled/tree/master).

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
XRP Ledger Standards (XLSs) describe standards and specifications relating to the XRP Ledger ecosystem that help achieve the following goals:
44

5-
* Ensure interoperability and compatibility between XRP Ledger core protocol, ecosystem applications, tools, and platforms.
6-
* Maintain a continued, excellent user experience around every application or system.
7-
* Drive alignment and agreement in the XRPL community (i.e., developers, users, operators, etc).
8-
5+
- Ensure interoperability and compatibility between XRP Ledger core protocol, ecosystem applications, tools, and platforms.
6+
- Maintain a continued, excellent user experience around every application or system.
7+
- Drive alignment and agreement in the XRPL community (i.e., developers, users, operators, etc).
8+
99
# [Contributing](./CONTRIBUTING.md)
1010

11-
The exact process for organizing and contributing to this repository is defined in [CONTRIBUTING.md](./CONTRIBUTING.md). If you would like to contribute, please read more there.
11+
The exact process for organizing and contributing to this repository is defined in [CONTRIBUTING.md](./CONTRIBUTING.md). If you would like to contribute, please read more there.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<pre>
2+
xls: 2
3+
title: XRPL destination information
4+
description: A standard for encoding destination information with backwards compatibility for web browsers
5+
author: Wietse Wind <w@xrpl-labs.com>
6+
discussion-from: https://github.com/XRPLF/XRPL-Standards/discussions/27
7+
status: Stagnant
8+
category: Community
9+
created: 2019-02-25
10+
</pre>
11+
12+
Currently several apps are using a variety of methods to encode destination information;
13+
14+
- rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY?dt=123
15+
- rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY:123
16+
- Deprecated Ripple URI syntax: https://ripple.com//send?to=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&amount=30&dt=123
17+
18+
I feel the best way to implement this, is by allowing Apps to register Deep Links (URI handlers) while keeping the destinations backwards compatible with Web browsers, so users without any app to handle a URI can display a page by the app creator with an instruction.
19+
20+
I propose to allow any URL prefix, with a default set of GET URL params, supporting the existing params proposed in the (deprecated) Ripple URI standard;
21+
22+
so:
23+
24+
{ any URL } ? { params }
25+
26+
Where params may _all_ be optional except for the account address:
27+
28+
- `to` (account address, rXXXX..)
29+
- `dt` (destination tag, uint32)
30+
- `amount` (float, default currency: XRP (1000000 drops))
31+
- ...
32+
33+
So App 1 may use:
34+
https://someapp.com/sendXrp?to=...
35+
36+
... While App 2 uses:
37+
https://anotherapp.net/deposit-xrp?to=...&dt=1234&amount=10
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
function xls2d(uri) {
2+
const cleaned_uri = uri
3+
.replace(/^(.*:.*)?\?/gm, "")
4+
.replace(/\?/gim, "&")
5+
.replace(/^.*?:\/\//, "")
6+
.replace(/^ripple:/gim, "");
7+
8+
function clean() {
9+
return cleaned_uri;
10+
}
11+
12+
function to() {
13+
//NB: this regex is case sensitive to assist in correctly matching XRP ledger addresses
14+
var match =
15+
/(?:(?:^|&)(?:to|TO|tO|To)=|^)([rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,55})/gm.exec(
16+
cleaned_uri,
17+
);
18+
return match == null ? false : match[1];
19+
}
20+
21+
function dt() {
22+
var match = /(?:^|&)dt=([0-9]+)|:([0-9]+)$/gim.exec(cleaned_uri);
23+
if (match != null) return match[1] ? match[1] : match[2];
24+
return false;
25+
}
26+
27+
function amount() {
28+
var match = /(?:^|&)am(?:oun)?t=([0-9\.]+)/gim.exec(cleaned_uri);
29+
return match == null ? false : match[1];
30+
}
31+
32+
function currency() {
33+
var match =
34+
/(?:^|&)cur(?:rency)?=(?:([rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,55}):)?([A-Z]{3}|[A-Fa-f]{40})/gim.exec(
35+
cleaned_uri,
36+
);
37+
return match == null
38+
? false
39+
: { issuer: match[1] ? match[1] : false, currency: match[2] };
40+
}
41+
42+
function invoiceid() {
43+
var match = /(?:^|&)inv(?:oice)?(?:id)?=([a-f]{64})/gim.exec(cleaned_uri);
44+
return match == null ? false : match[1];
45+
}
46+
47+
return {
48+
uri: uri,
49+
clean: clean(),
50+
to: to(),
51+
dt: dt(),
52+
amount: amount(),
53+
currency: currency(),
54+
invoiceid: invoiceid(),
55+
};
56+
}
57+
58+
var examples = [
59+
"rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY?dt=123",
60+
"rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY:123",
61+
"https://ripple.com//send?to=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&amount=30&dt=123",
62+
"https://sub.domain.site.edu.au//send?to=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&amount=30&dt=123",
63+
"https://someapp.com/sendXrp?to=rRippleBlah&dt=4&invoiceid=abcdef",
64+
"deposit-xrp?to=blah",
65+
"?rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY:123",
66+
"rAhDr1qUEG4gHXt6m6zyRE4oogDDWmYvcgotCqyyEpArk8",
67+
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ",
68+
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ&currency=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:USD",
69+
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ&currency=USD",
70+
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ&currency=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:USD&invid=DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF",
71+
"scheme://uri/folders?rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY:123",
72+
"scheme://uri/folders?rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&amount=4:123", // this one a bit iffy
73+
"XVLhHMPHU98es4dbozjVtdWzVrDjtV8xvjGQTYPiAx6gwDC",
74+
"to=XVLhHMPHU98es4dbozjVtdWzVrDjtV8xvjGQTYPiAx6gwDC",
75+
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u",
76+
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:58321",
77+
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:58321&currency=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:USD",
78+
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:58321&currency=XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:ABC",
79+
"xrpl://XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u",
80+
"xrp://XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u",
81+
"f3w54ygsdfgfserga",
82+
];
83+
84+
for (var i in examples) console.log(xls2d(examples[i]));

0 commit comments

Comments
 (0)