Closed tequdev closed 2 years ago
I don't believe there's any rippled request which can do that unfortunately.
Closest thing I could find in the XLS 20d spec is this description of how to search for NFTokens:
To search for a specific NFToken, the first step is to locate the NFTokenPage, if any, that should contain that NFToken. For that do the following:
Compute the NFTokenPageID using the account of the owner and the TokenID of the token, as described above. Then search for the ledger entry whose identifier is less than or equal to that value. If that entry does not exist or is not an NFTokenPage, the NFToken is not held by the given account.
https://github.com/XRPLF/XRPL-Standards/discussions/46
(One way to build your own TokenId lookup is to have a database which watches the ledger and updates whenever you see a TokenMint, which you can then search for TokenIds in whichever manner you want)
I would like to add this to xrpl-py too (if it doesn't exist yet 😀)
if I'm not mistaken OP wants to translate the encoded id into the unpacked map
Oh shoot, sorry for misinterpreting!
That makes sense :)
if I'm not mistaken OP wants to translate the encoded id into the unpacked map
Yes, that's correct.
I don't know how to decode the encoded address 95F14B0044F78A264E41713C64B5F89242540EE2
to rNCFjv8Ek5oDrNiMJ3pw6eLLFtMjZLJnf2
.
+1, would be nice to have it in the lib.
I don't know how to decode the encoded address
95F14B0044F78A264E41713C64B5F89242540EE2
torNCFjv8Ek5oDrNiMJ3pw6eLLFtMjZLJnf2
.
You can use "ripple-address-codec"
to get rAddress
AddressCodec.encodeAccountID(Buffer.from("95F14B0044F78A264E41713C64B5F89242540EE2", "hex"));
Our temp solution https://github.com/Bithomp/xrpl-api/blob/master/src/client/account_nfts.ts#L227
Closed by #1961
Can we resolve TokenID of NFToken object?
like:
anyFunc(000B013A95F14B0044F78A264E41713C64B5F89242540EE208C3098E00000D65)
return