Skip to content

Commit a00dead

Browse files
authored
Merge branch 'master' into ctid
2 parents 34518e1 + 7ce783a commit a00dead

File tree

64 files changed

+8646
-2648
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

+8646
-2648
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ concurrency:
1616

1717
jobs:
1818
build:
19+
if: github.repository == 'XRPLF/XRPL-Standards'
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: Checkout
2223
uses: actions/checkout@v5
2324

2425
- name: Setup Python
25-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v6
2627
with:
2728
python-version: "3.11"
2829

@@ -42,6 +43,8 @@ jobs:
4243
4344
- name: Build site
4445
run: python site/build_site.py
46+
env:
47+
GITHUB_PAGES_BASE_URL: ""
4548

4649
- name: Setup Pages
4750
uses: actions/configure-pages@v5
@@ -52,6 +55,7 @@ jobs:
5255
path: "site/_site"
5356

5457
deploy:
58+
if: github.repository == 'XRPLF/XRPL-Standards'
5559
environment:
5660
name: github-pages
5761
url: ${{ steps.deployment.outputs.page_url }}

.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@v5
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@v5
1717

1818
- name: Setup Python
19-
uses: actions/setup-python@v5
19+
uses: actions/setup-python@v6
2020
with:
2121
python-version: "3.11"
2222

.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.

XLS-0002-destination-information/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Where params may _all_ be optional except for the account address:
2828
- `to` (account address, rXXXX..)
2929
- `dt` (destination tag, uint32)
3030
- `amount` (float, default currency: XRP (1000000 drops))
31-
- ...
31+
- ...
3232

3333
So App 1 may use:
3434
https://someapp.com/sendXrp?to=...
3535

3636
... While App 2 uses:
37-
https://anotherapp.net/deposit-xrp?to=...&dt=1234&amount=10
37+
https://anotherapp.net/deposit-xrp?to=...&dt=1234&amount=10
Lines changed: 71 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,84 @@
11
function xls2d(uri) {
2+
const cleaned_uri = uri
3+
.replace(/^(.*:.*)?\?/gm, "")
4+
.replace(/\?/gim, "&")
5+
.replace(/^.*?:\/\//, "")
6+
.replace(/^ripple:/gim, "");
27

3-
const cleaned_uri = uri.replace(/^(.*:.*)?\?/mg, "").replace(/\?/img, "&").replace(/^.*?:\/\//, '').replace(/^ripple:/img, "")
8+
function clean() {
9+
return cleaned_uri;
10+
}
411

5-
function clean() {
6-
return cleaned_uri
7-
}
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+
}
820

9-
function to() {
10-
//NB: this regex is case sensitive to assist in correctly matching XRP ledger addresses
11-
var match = /(?:(?:^|&)(?:to|TO|tO|To)=|^)([rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,55})/mg.exec(cleaned_uri)
12-
return (match == null ? false : match[1])
13-
}
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+
}
1426

15-
function dt() {
16-
var match = /(?:^|&)dt=([0-9]+)|:([0-9]+)$/img.exec(cleaned_uri)
17-
if (match != null) return (match[1] ? match[1] : match[2])
18-
return false
19-
}
27+
function amount() {
28+
var match = /(?:^|&)am(?:oun)?t=([0-9\.]+)/gim.exec(cleaned_uri);
29+
return match == null ? false : match[1];
30+
}
2031

21-
function amount() {
22-
var match = /(?:^|&)am(?:oun)?t=([0-9\.]+)/img.exec(cleaned_uri)
23-
return (match == null ? false : match[1])
24-
}
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+
}
2541

26-
function currency() {
27-
var match = /(?:^|&)cur(?:rency)?=(?:([rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,55}):)?([A-Z]{3}|[A-Fa-f]{40})/img.exec(cleaned_uri)
28-
return (match == null ? false : { issuer: ( match[1] ? match[1] : false ), currency: match[2] } )
29-
}
42+
function invoiceid() {
43+
var match = /(?:^|&)inv(?:oice)?(?:id)?=([a-f]{64})/gim.exec(cleaned_uri);
44+
return match == null ? false : match[1];
45+
}
3046

31-
32-
function invoiceid() {
33-
var match = /(?:^|&)inv(?:oice)?(?:id)?=([a-f]{64})/img.exec(cleaned_uri)
34-
return (match == null ? false : match[1])
35-
}
36-
37-
38-
return {
39-
uri: uri,
40-
clean: clean(),
41-
to: to(),
42-
dt: dt(),
43-
amount: amount(),
44-
currency: currency(),
45-
invoiceid: invoiceid()
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+
};
4756
}
4857

4958
var examples = [
50-
"rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY?dt=123",
51-
"rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY:123",
52-
"https://ripple.com//send?to=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&amount=30&dt=123",
53-
"https://sub.domain.site.edu.au//send?to=rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&amount=30&dt=123",
54-
"https://someapp.com/sendXrp?to=rRippleBlah&dt=4&invoiceid=abcdef",
55-
"deposit-xrp?to=blah",
56-
"?rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY:123",
57-
"rAhDr1qUEG4gHXt6m6zyRE4oogDDWmYvcgotCqyyEpArk8",
58-
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ",
59-
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ&currency=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:USD",
60-
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ&currency=USD",
61-
"to=rAhDr1qUEG4gHXt6m6zyRE4oogDDWmXFdzQdZdH9SJzcNJ&currency=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:USD&invid=DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF",
62-
"scheme://uri/folders?rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY:123",
63-
"scheme://uri/folders?rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY&amount=4:123", // this one a bit iffy
64-
"XVLhHMPHU98es4dbozjVtdWzVrDjtV8xvjGQTYPiAx6gwDC",
65-
"to=XVLhHMPHU98es4dbozjVtdWzVrDjtV8xvjGQTYPiAx6gwDC",
66-
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u",
67-
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:58321",
68-
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:58321&currency=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:USD",
69-
"ripple:XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:58321&currency=XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u:ABC",
70-
"xrpl://XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u",
71-
"xrp://XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u",
72-
"f3w54ygsdfgfserga"
73-
]
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+
];
7483

7584
for (var i in examples) console.log(xls2d(examples[i]));

XLS-0003-deeplink-signed-transactions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ MSIE limits URL parsing to 2,083 chars. Safari 65k chars. Todo: need to test thi
3434
P.S. Another option (proposal) would be to use a specific syntax (prefix) instead of fixed (one) folder; eg.
3535
`https://xrpl-labs.com/xrpl:signed-transaction:<SIGNEDBLOB>`
3636

37-
... Where the fixed prefix in this case is `xrpl:signed-transaction:`.
37+
... Where the fixed prefix in this case is `xrpl:signed-transaction:`.

XLS-0004-trustline-uri/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ So for example
2525

2626
`anything://any.domain/url/?action=trustline&limit=10000&currency=rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:USD&rippling=false`
2727

28-
I realise compounding the currency and issuer information is a little tacky here but we did it in the previous standard
28+
I realise compounding the currency and issuer information is a little tacky here but we did it in the previous standard

0 commit comments

Comments
 (0)