Open omertoast opened 3 years ago
Hi @omrtozd,
I maintain the Xpring/RippleX testnet nodes, and can help answer any questions you might have. Some notes/comments from me about what you wrote above are below.
RippleX is going to be moving our ILP Testnet over to the https://ilpv4.dev domain in the not too distant future, so I would use that URL if you're writing new code for your CLI. The endpoint should work as you indicated, but here's an updated URL:
curl --location --request POST 'https://hermes-rest.ilpv4.dev/accounts' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw ''
The system will auto-generate a new account username if you execute the call above, so (as you discovered) if you instead want to change these details, you can do something like this instead (assuming the username isn't taken):
curl --location --request POST 'https://hermes-rest.ilpv4.dev/accounts' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"accountId": "test-david2",
"assetCode": "XRP",
"assetScale": 9
}'
Yes, the old response was coming from maybe the JS Connector. However, the Ripple Testnet is now powered by the Java Connector, with a peering relationship to rafiki, which is JS.
I think that Java, JS, and Rust each have a slightly different admin API, however, so you'll maybe instead want to make clients based upon the language implementation as opposed to any particular testnet.
Happy to answer any other questions you might have here.
Thanks for the notes. I noticed that API doesn't return a BTP endpoint, is this intentional, or RippleX nodes don't support BTP?
I noticed that API doesn't return a BTP endpoint, is this intentional, or RippleX nodes don't support BTP?
Yes, this is intentional. At first it was because I didn't have time to implement BTP, but in practice, ILP-over-HTTP works very well, so we haven't had a need or request to implement BTP in the Java Connector (I suspect we never will).
is there a way to send a curl post request to fund the wallet account
Deprecated Xpring API had an endpoint
https://xpring.io/api/accounts/<assetCode>
to create accounts on Xpring's side.ilp-cli testnet setup
command was using this endpoint to create an account and peer with it to connect the testnet easily.But since Xpring rebranded as RippleX, API endpoints and responses changed with it. For now, I find out three things that need to change, in order to
ilp-cli testnet setup
command work.1) API endpoint, which changed from
https://xpring.io/api/accounts/<assetCode>
tohttps://ripplex.io/portal/ilp/hermes/accounts/
. Also, you should send aPOST
request instead of aGET
request.2) The method to change the account asset. You should send a POST request to
https://ripplex.io/portal/ilp/hermes/accounts/
with a JSON payload, an object namedassetCode
in it to use an asset other than XRP. You can see the old method here: https://github.com/omrtozd/interledger-rs/blob/master/docs/manual-config.md#get-your-own-credentials3) The
XpringResponse
struct, due to the change in the response format.XpringResponse Struct: https://github.com/omrtozd/interledger-rs/blob/0fcaf5d0a9b34d52bde08250a5f52f5398f6c7ab/crates/ilp-cli/src/interpreter.rs#L394-L403
Example response: