diff --git a/src/rpc/handlers/LedgerEntry.cpp b/src/rpc/handlers/LedgerEntry.cpp index db312706..469cfcf6 100644 --- a/src/rpc/handlers/LedgerEntry.cpp +++ b/src/rpc/handlers/LedgerEntry.cpp @@ -189,6 +189,7 @@ tag_invoke(boost::json::value_to_tag, boost::json::va {JS(payment_channel), ripple::ltPAYCHAN}, {JS(deposit_preauth), ripple::ltDEPOSIT_PREAUTH}, {JS(ticket), ripple::ltTICKET}, + {JS(nft_page), ripple::ltNFTOKEN_PAGE}, }; auto const indexFieldType = diff --git a/src/rpc/handlers/LedgerEntry.h b/src/rpc/handlers/LedgerEntry.h index 787a784f..8eb84fbc 100644 --- a/src/rpc/handlers/LedgerEntry.h +++ b/src/rpc/handlers/LedgerEntry.h @@ -28,7 +28,6 @@ namespace RPC { /** * @brief The ledger_entry method returns a single ledger object from the XRP Ledger in its raw format. - * The clio has not supported: nft_page * * For more details see: https://xrpl.org/ledger_entry.html */ @@ -47,7 +46,6 @@ public: bool validated = true; }; - // TODO: nft_page has not been implemented struct Input { std::optional ledgerHash; @@ -156,6 +154,7 @@ public: {JS(ticket_seq), validation::Required{}, validation::Type{}}, }, }}, + {JS(nft_page), validation::Uint256HexStringValidator}, }; return rpcSpec; diff --git a/unittests/rpc/handlers/LedgerEntryTest.cpp b/unittests/rpc/handlers/LedgerEntryTest.cpp index 1082f2fb..a6612bc6 100644 --- a/unittests/rpc/handlers/LedgerEntryTest.cpp +++ b/unittests/rpc/handlers/LedgerEntryTest.cpp @@ -34,6 +34,7 @@ constexpr static auto ACCOUNT2 = "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun"; constexpr static auto RANGEMIN = 10; constexpr static auto RANGEMAX = 30; constexpr static auto LEDGERHASH = "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652"; +constexpr static auto TOKENID = "000827103B94ECBB7BF0A0A6ED62B3607801A27B65F4679F4AD1D4850000C0EA"; class RPCLedgerEntryTest : public HandlerBaseTest { @@ -572,11 +573,11 @@ struct IndexTest : public HandlerBaseTest, public WithParamInterface(TOKENID, "www.ok.com")}, std::nullopt)}, NormalPathTestBundle{ "Check", fmt::format(