-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
305c9a8
commit ae58582
Showing
11 changed files
with
742 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
//------------------------------------------------------------------------------ | ||
/* | ||
This file is part of rippled: https://github.com/ripple/rippled | ||
Copyright (c) 2019 Ripple Labs Inc. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
//============================================================================== | ||
|
||
#ifndef RIPPLE_RPC_NFTOKENID_H_INCLUDED | ||
#define RIPPLE_RPC_NFTOKENID_H_INCLUDED | ||
|
||
#include <ripple/protocol/Protocol.h> | ||
|
||
#include <functional> | ||
#include <memory> | ||
|
||
namespace Json { | ||
class Value; | ||
} | ||
|
||
namespace ripple { | ||
|
||
class TxMeta; | ||
class STTx; | ||
|
||
namespace RPC { | ||
|
||
/** | ||
Add a `nftoken_ids` field to the `meta` output parameter. | ||
The field is only added to successful NFTokenMint, NFTokenAcceptOffer, | ||
and NFTokenCancelOffer transactions. | ||
@{ | ||
*/ | ||
bool | ||
canHaveNFTokenID(std::shared_ptr<STTx const> const&, TxMeta const&); | ||
|
||
void | ||
getNFTokenIDFromPage(TxMeta const&, std::vector<uint256>&); | ||
|
||
void | ||
getNFTokenIDFromDeletedOffer(TxMeta const&, std::vector<uint256>&); | ||
|
||
void | ||
insertNFTokenID( | ||
Json::Value&, | ||
std::shared_ptr<STTx const> const&, | ||
TxMeta const&); | ||
/** @} */ | ||
|
||
} // namespace RPC | ||
} // namespace ripple | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
//------------------------------------------------------------------------------ | ||
/* | ||
This file is part of rippled: https://github.com/ripple/rippled | ||
Copyright (c) 2019 Ripple Labs Inc. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
//============================================================================== | ||
|
||
#ifndef RIPPLE_RPC_NFTOKENOFFERID_H_INCLUDED | ||
#define RIPPLE_RPC_NFTOKENOFFERID_H_INCLUDED | ||
|
||
#include <ripple/protocol/Protocol.h> | ||
|
||
#include <functional> | ||
#include <memory> | ||
|
||
namespace Json { | ||
class Value; | ||
} | ||
|
||
namespace ripple { | ||
|
||
class TxMeta; | ||
class STTx; | ||
|
||
namespace RPC { | ||
|
||
/** | ||
Add an `offer_id` field to the `meta` output parameter. | ||
The field is only added to successful NFTokenCreateOffer transactions. | ||
@{ | ||
*/ | ||
bool | ||
canHaveNFTokenOfferID(std::shared_ptr<STTx const> const&, TxMeta const&); | ||
|
||
void | ||
getOfferIDFromCreatedOffer(TxMeta const&, std::vector<uint256>&); | ||
|
||
void | ||
insertNFTokenOfferID( | ||
Json::Value&, | ||
std::shared_ptr<STTx const> const&, | ||
TxMeta const&); | ||
/** @} */ | ||
|
||
} // namespace RPC | ||
} // namespace ripple | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//------------------------------------------------------------------------------ | ||
/* | ||
This file is part of rippled: https://github.com/ripple/rippled | ||
Copyright (c) 2019 Ripple Labs Inc. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
//============================================================================== | ||
|
||
#ifndef RIPPLE_RPC_TXMETASERIALIZER_H_INCLUDED | ||
#define RIPPLE_RPC_TXMETASERIALIZER_H_INCLUDED | ||
|
||
#include <ripple/protocol/Protocol.h> | ||
#include <ripple/protocol/STBase.h> | ||
|
||
#include <functional> | ||
#include <memory> | ||
|
||
namespace Json { | ||
class Value; | ||
} | ||
|
||
namespace ripple { | ||
|
||
class TxMeta; | ||
class STTx; | ||
|
||
namespace RPC { | ||
|
||
struct JsonContext; | ||
|
||
/** | ||
Adds common synthetic fields to transaction-related JSON responses | ||
@{ | ||
*/ | ||
void | ||
serializeTxMetaAsJSON( | ||
Json::Value&, | ||
RPC::JsonContext const&, | ||
std::shared_ptr<STTx const> const&, | ||
TxMeta const&, | ||
JsonOptions); | ||
/** @} */ | ||
|
||
} // namespace RPC | ||
} // namespace ripple | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.