XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.48k stars 1.45k forks source link

this conan command is absent #4974

Closed Relect closed 2 months ago

Relect commented 3 months ago

https://github.com/XRPLF/rippled/blob/4bcbf70cae6dc4883c4e695e25a90267b32effa4/BUILD.md?plain=1#L89

ximinez commented 2 months ago

Conan versions >= 2.0 are not yet supported. The instructions may need to be updated to make that clearer.

Relect commented 2 months ago

the documentation has serious flaws https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/account-methods/account_info/ does not contain a description of the balance field

https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry/ required index , it is unclear where to get it and how it turns out. The ledger entry ID of a single entry to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. although it is written that this is a ledger hash, but the ledger hash is different from the index

ximinez commented 2 months ago

the documentation has serious flaws https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/account-methods/account_info/ does not contain a description of the balance field

The description of the account_data result field has a link to the AccountRoot ledger object page, which does contain a description.

https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry/ required index , it is unclear where to get it and how it turns out. The ledger entry ID of a single entry to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. although it is written that this is a ledger hash, but the ledger hash is different from the index

That description contains a link to a description of ledger entry common fields, including the index. Specifically, https://xrpl.org/docs/references/protocol/ledger-data/common-fields/#ledger-entry-id. The index is a hash of certain values, and while it's possible, generally you're not likely to be computing that yourself. You'll usually get it as output from some other command, and if you don't have it, you're probably better off using one of the other parameters to find what you need. Notably, any successful ledger-data request will include the index, which you can use on later requests.

There is a separate repository for the documentation on xrpl.org. Any other concerns would be more appropriate to address there. https://github.com/XRPLF/xrpl-dev-portal

Relect commented 2 months ago

There is a separate repository for the documentation on xrpl.org. Any other concerns would be more appropriate to address there. https://github.com/XRPLF/xrpl-dev-portal yes, I only found this resource yesterday although I’ve been studying it for a month

Relect commented 2 months ago

It is not clear where to get the index value for ledger_entry method ; the index does not match the ledger hash. And how can I get all transactions one block using this method?

on https://github.com/XRPLF/xrpl-dev-portal they don't give answers

mvadari commented 2 months ago

You'll need to use the ledger command to get all the transactions from one ledger (block). https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger

Relect commented 2 months ago

thank's, but writing "The ledger field is deprecated and may be removed without further notice." how to deal with this? and then what is the difference method Ledger_data and Ledger_entry?

mvadari commented 2 months ago

thank's, but writing "The ledger field is deprecated and may be removed without further notice." how to deal with this?

That only refers to an undocumented field, the ledger request is still supported/undeprecated.

and then what is the difference method Ledger_data and Ledger_entry?

ledger_data fetches all of the ledger objects in a given ledger, and ledger_entry fetches a specific ledger object.

Relect commented 2 months ago

tell me what hashes or value is returned by the memos array of one transaction from the account_tx method

 "Memos": [
                        {
                            "Memo": {
                                "MemoData": "546F20616C6C20476174654875622075736572732C"
                            }
                        },
                        { ...
mvadari commented 2 months ago

It's just encoded hex. You can use the xrpl.js convertHexToString method to reverse it.

Relect commented 2 months ago

this hex result method

{
    "method": "account_tx",
    "params": [
        {
            "account": "rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AV",
            "binary": false,
            "forward": true,
            "ledger_index_max": 87169756,
            "ledger_index_min": 87169756
        }
    ]
}

binary false is used, which means it is not encoded json, but a hash, I would like to understand what exactly and how to use it

used xrp4j (java) decode result error

        XrplBinaryCodec codec = XrplBinaryCodec.getInstance();        
        String st = "546F20616C6C20476174654875622075736572732C";
        String st2 = codec.decode(st);
        System.out.println(st2);

Exception in thread "main" java.lang.RuntimeException: could not instantiate field of type org.xrpl.xrpl4j.codec.binary.types.STObjectType

decoded binary transactions using this method are successful

sappenin commented 2 months ago

used xrp4j (java) decode result error

To decode the memo data, don't use the binary codec. Instead, just use a normal Hex decoder. From the perspective of the ledger, this is just binary data that is manifesting as a hex-encoded string in the response you're seeing above.

E.g., try this:

    byte[] bytes = com.google.common.io.BaseEncoding.base16().decode("546F20616C6C20476174654875622075736572732C");
    String memoAsString = new String(bytes);
    System.out.println(memoAsString); // --> "To all GateHub users,"