NFTokenAcceptOffer constructor

NFTokenAcceptOffer({
  1. required String account,
  2. String? nfTokenBrokerFee,
  3. String? nfTokenBuyOffer,
  4. String? nfTokenSellOffer,
  5. List<XRPLMemo>? memos = const [],
  6. int? ticketSequance,
  7. String signingPubKey = "",
  8. int? sequence,
  9. String? fee,
  10. int? lastLedgerSequence,
})

nfTokenSellOffer Identifies the NFTokenOffer that offers to sell the NFToken. In direct mode this field is optional, but either NFTokenSellOffer or NFTokenBuyOffer must be specified. In brokered mode, both NFTokenSellOffer and NFTokenBuyOffer must be specified.

nfTokenBuyOffer Identifies the NFTokenOffer that offers to buy the NFToken. In direct mode this field is optional, but either NFTokenSellOffer or NFTokenBuyOffer must be specified. In brokered mode, both NFTokenSellOffer and NFTokenBuyOffer must be specified.

nfTokenBrokerFee This field is only valid in brokered mode. It specifies the amount that the broker will keep as part of their fee for bringing the two offers together; the remaining amount will be sent to the seller of the NFToken being bought. If specified, the fee must be such that, prior to accounting for the transfer fee charged by the issuer, the amount that the seller would receive is at least as much as the amount indicated in the sell offer.

This functionality is intended to allow the owner of an NFToken to offer their token for sale to a third party broker, who may then attempt to sell the NFToken on for a larger amount, without the broker having to own the NFToken or custody funds.

Note: in brokered mode, the offers referenced by NFTokenBuyOffer and NFTokenSellOffer must both specify the same TokenID; that is, both must be for the same NFToken.

Implementation

NFTokenAcceptOffer({
  required super.account,
  this.nfTokenBrokerFee,
  this.nfTokenBuyOffer,
  this.nfTokenSellOffer,
  super.memos,
  super.ticketSequance,
  super.signingPubKey,
  super.sequence,
  super.fee,
  super.lastLedgerSequence,
})  : assert(
          (nfTokenBrokerFee != null && nfTokenSellOffer != null) ||
              (nfTokenSellOffer != null || nfTokenBuyOffer != null),
          nfTokenBrokerFee != null
              ? "Must be set if using brokered mode"
              : "Must set either nftoken_buy_offer or nftoken_sell_offer"),
      assert(
          (nfTokenBrokerFee != null && nfTokenBuyOffer != null) ||
              (nfTokenSellOffer != null || nfTokenBuyOffer != null),
          nfTokenBrokerFee != null
              ? "Must be set if using brokered mode"
              : "Must set either nftoken_buy_offer or nftoken_sell_offer"),
      super(transactionType: XRPLTransactionType.NFTOKEN_ACCEPT_OFFER);