XRPLF / xrpl-py

A Python library to interact with the XRP Ledger (XRPL) blockchain
ISC License
145 stars 83 forks source link

Add Ledger Objects #663

Open LimpidCrypto opened 8 months ago

LimpidCrypto commented 8 months ago

High Level Overview of Change

This PR adds (some) Ledger Object models:

You might want to look over the fields if they are still correct as it's been a while since I wrote them.

TODO

@JST5000 and I had a great chat this week. He told me one thing you might prioritize as a coming feature would be response models. I remembered I once had a PR adding Ledger Object and Metadata models and was told to split it up into two PRs, but somehow I forgot about it. This PR adds the Ledger objects. I could imagine there are some objects missing or are a bit deprecated but I still wanted to leave the progress made here for you to use.

Type of Change

Did you update CHANGELOG.md?

Test Plan

I wrote tests trying to de-/serialize them from/to json.

khancode commented 4 months ago

One potential issue: the ledger_entry request file also contains a bunch of classes with the same names as these objects.

I don't think it's an issue since they're differentiated by import paths.

mvadari commented 4 months ago

One potential issue: the ledger_entry request file also contains a bunch of classes with the same names as these objects.

I don't think it's an issue since they're differentiated by import paths.

They are, but if you're using both it can still get confusing.

khancode commented 4 months ago

One potential issue: the ledger_entry request file also contains a bunch of classes with the same names as these objects.

I don't think it's an issue since they're differentiated by import paths.

They are, but if you're using both it can still get confusing.

Thoughts on adding prefix/postfix to the ledger object class names?

mvadari commented 1 week ago

@khancode this PR should also add support for the fixPreviousTxnID amendment, which was added in rippled 2.2.0.

https://github.com/XRPLF/rippled/pull/4751

khancode commented 1 week ago

@khancode this PR should also add support for the fixPreviousTxnID amendment, which was added in rippled 2.2.0.

https://github.com/XRPLF/rippled/pull/4751

Update: this PR is deprioritized and I'm no longer working on it. Feel free to pick it up or anyone else.