-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xrp-ledger.toml Checker #572
Conversation
It would be nice to also have a way to put in an address on MainNet or TestNet and have the checker read the |
@MarkusTeufelberger That's a great idea. I've opened #576 to remember to do that later without expanding the scope of this task right now. |
- Update ripple-lib to 1.2.4 - Redirects ripple.txt validator to the xrp-ledger.toml checker
4c7d2df
to
8f11843
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small fix. Overall, this looks great!
assets/js/xrp-ledger-toml-checker.js
Outdated
for (j=0; j<fields.length; j++) { | ||
let fieldname = fields[j] | ||
if (entry[fieldname] !== undefined) { | ||
let field_def = $("<li><strong>"+fieldname+":</strong> ").appendTo(entry_def) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ":</strong> "
, the space is ignored/removed by jQuery. Simple fix: Move it to before </strong>
like so:
": </strong>"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
https://ripple.com/.well-known/xrp-ledger.toml :-( Would be nice to have one of these pre-filled by default instead of "example.com". |
WIP - TOML reader (returns JSON) |
Address to TOML finder also active now. Again WIP |
@alloyxrp I was wondering why my checker wasn't displaying the information for your file; turns out the checker is right and you have a recurring syntax error in your This might be something I could add to the checker to look for. (Apologies if you get a duplicate notification: posted this in the wrong issue a moment ago.) |
Not really. I would use the [[ only if I had multiple validators or accounts, like you have in your file. I am actually using a toml python module to read the file. I will try the various possible errors, in case the module isn't doing all the checks. Will also check today by putting multiple validators with a single brace. I need to be more verbose in my error message. The docs seem to be pretty clear on this. Per my understanding 😬 |
An array of tables with length 1 is not the same as a table on its own. It's a bit more obvious if I translate it to JSON... Single-brackets (wrong): {
"VALIDATORS": {
"public_key": "n9KM73uq5BM3Fc6cxG3k5TruvbLc8Ffq17JZBmWC4uP4csL4rFST",
"desc": "My dogfood rippled machine. Not a reliable validator."
}
} Double-brackets (correct): {
"VALIDATORS": [
{
"public_key": "n9KM73uq5BM3Fc6cxG3k5TruvbLc8Ffq17JZBmWC4uP4csL4rFST",
"desc": "My dogfood rippled machine. Not a reliable validator."
}
]
} I don't think we should mix and match datatypes for this. It should always be an array, even if there's only one entry. |
It's not wrong. They are both valid json. Maybe in the context of the tool, you require a list. |
@mDuo13 : Can you check https://xrptools.alloy.ee/checktoml?domain=alloy.ee now. I've changed it to double quotes (except in METADATA). I'll also add a check to warn if the rest of the sections don't have a |
Note for later: If Firefox reports an XML parsing error in the toml checker, it means your web server is serving the wrong content type. Optionally add the following line to your AddType application/toml .toml |
Yes, I noticed that too. I've modified my tool to check for that, and also give suggestions depending on the webserver. |
@@ -246,7 +246,7 @@ There are several prerequisites that ACME must meet for this to happen: | |||
- ACME must control an address in the XRP Ledger. Ripple's best practices recommend using a separate issuing address and operational address. See [Issuing and Operational Addresses](issuing-and-operational-addresses.html) for details. | |||
- ACME must enable the [DefaultRipple Flag](#defaultripple) on its issuing address for customers to send and receive its issuances. | |||
- Alice must create an accounting relationship (trust line) from her XRP Ledger address to ACME's issuing address. She can do this from any XRP Ledger client application as long as she knows ACME's issuing address. | |||
- ACME should publicize its issuing address on its website where customers can find it. It can also use [ripple.txt](#rippletxt) to publish the issuing address to automated systems. | |||
- ACME should publicize its issuing address on its website where customers can find it. It can also use an [`xrp-ledger.toml` file](xrp-ledger-toml.html) to publish the issuing address to automated systems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"can also" --> "should also"?
Domain
fields against the domain being queried.For an example of a working site, enter
mduo13.com
to check my personal XRPL TOML file.