diff --git a/shared/requests/submit.yaml b/shared/requests/submit.yaml index 7b9e6fc..95a3aab 100644 --- a/shared/requests/submit.yaml +++ b/shared/requests/submit.yaml @@ -96,6 +96,11 @@ components: MPTokenIssuanceCreate: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' MPTokenIssuanceDestroy: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' MPTokenIssuanceSet: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + NFTokenAcceptOffer: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + NFTokenBurn: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + NFTokenCancelOffer: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + NFTokenCreateOffer: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + NFTokenMint: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' oneOf: - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV1' - $ref: '../transactions/oracle_set.yaml#/components/schemas/OracleSetTransaction' @@ -125,6 +130,11 @@ components: - $ref: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' - $ref: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' - $ref: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + - $ref: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + - $ref: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + - $ref: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + - $ref: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + - $ref: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' # TODO: Add other transaction types here description: 'Transaction definition in JSON format, optionally omitting any auto-fillable fields.' @@ -169,6 +179,11 @@ components: MPTokenIssuanceCreate: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' MPTokenIssuanceDestroy: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' MPTokenIssuanceSet: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + NFTokenAcceptOffer: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + NFTokenBurn: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + NFTokenCancelOffer: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + NFTokenCreateOffer: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + NFTokenMint: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' oneOf: - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV2' - $ref: '../transactions/oracle_set.yaml#/components/schemas/OracleSetTransaction' @@ -198,6 +213,11 @@ components: - $ref: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' - $ref: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' - $ref: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + - $ref: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + - $ref: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + - $ref: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + - $ref: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + - $ref: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' # TODO: Add other transaction types here description: 'Transaction definition in JSON format, optionally omitting any auto-fillable fields.' required: @@ -301,6 +321,11 @@ components: MPTokenIssuanceCreate: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' MPTokenIssuanceDestroy: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' MPTokenIssuanceSet: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + NFTokenAcceptOffer: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + NFTokenBurn: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + NFTokenCancelOffer: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + NFTokenCreateOffer: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + NFTokenMint: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' # TODO: Add other transaction types here oneOf: - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV1' @@ -331,6 +356,11 @@ components: - $ref: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' - $ref: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' - $ref: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + - $ref: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + - $ref: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + - $ref: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + - $ref: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + - $ref: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' # TODO: Add other transaction types here SubmitSuccessResponseV2: @@ -370,6 +400,11 @@ components: MPTokenIssuanceCreate: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' MPTokenIssuanceDestroy: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' MPTokenIssuanceSet: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + NFTokenAcceptOffer: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + NFTokenBurn: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + NFTokenCancelOffer: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + NFTokenCreateOffer: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + NFTokenMint: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' # TODO: Add other transaction types here oneOf: - $ref: '../transactions/payment.yaml#/components/schemas/PaymentTransactionV2' @@ -400,6 +435,11 @@ components: - $ref: '../transactions/mptoken_issuance_create.yaml#/components/schemas/MPTokenIssuanceCreateTransaction' - $ref: '../transactions/mptoken_issuance_destroy.yaml#/components/schemas/MPTokenIssuanceDestroyTransaction' - $ref: '../transactions/mptoken_issuance_set.yaml#/components/schemas/MPTokenIssuanceSetTransaction' + - $ref: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferTransaction' + - $ref: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnTransaction' + - $ref: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferTransaction' + - $ref: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferTransaction' + - $ref: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintTransaction' # TODO: Add other transaction types here SubmitErrorResponse: @@ -425,6 +465,11 @@ components: - $ref: '../transactions/clawback.yaml#/components/schemas/ClawbackErrorCode' - $ref: '../transactions/deposit_preauth.yaml#/components/schemas/DepositPreauthErrorCode' - $ref: '../transactions/ticket_create.yaml#/components/schemas/TicketCreateErrorCode' + - $ref: '../transactions/nftoken_accept_offer.yaml#/components/schemas/NFTokenAcceptOfferErrorCode' + - $ref: '../transactions/nftoken_burn.yaml#/components/schemas/NFTokenBurnErrorCode' + - $ref: '../transactions/nftoken_cancel_offer.yaml#/components/schemas/NFTokenCancelOfferErrorCode' + - $ref: '../transactions/nftoken_create_offer.yaml#/components/schemas/NFTokenCreateOfferErrorCode' + - $ref: '../transactions/nftoken_mint.yaml#/components/schemas/NFTokenMintErrorCode' - enum: - amendmentBlocked - highFee diff --git a/shared/transactions/nftoken_accept_offer.yaml b/shared/transactions/nftoken_accept_offer.yaml new file mode 100644 index 0000000..7648cdf --- /dev/null +++ b/shared/transactions/nftoken_accept_offer.yaml @@ -0,0 +1,69 @@ +components: + schemas: + NFTokenAcceptOfferTransaction: + $id: NFTokenAcceptOfferTransaction + allOf: + - $ref: '../base.yaml#/components/schemas/BaseTransaction' + type: object + description: | + The NFTokenAcceptOffer transaction is used to accept offers to buy or sell an NFToken. It can either: + + - Allow one offer to be accepted. This is called direct mode. + - Allow two distinct offers, one offering to buy a given NFToken and the other offering to sell the same NFToken, + to be accepted in an atomic fashion. This is called brokered mode. + properties: + NFTokenSellOffer: + type: string + description: | + (Optional) Identifies the NFTokenOffer that offers to sell the NFToken. + NFTokenBuyOffer: + type: string + description: | + (Optional) Identifies the NFTokenOffer that offers to buy the NFToken. + NFTokenBrokerFee: + type: object + description: | + (Optional) This field is only valid in brokered mode, and specifies the amount that the broker keeps + as part of their fee for bringing the two offers together; the remaining amount is sent to the seller + of the NFToken being bought. If specified, the fee must be such that, before applying the transfer fee, + the amount that the seller would receive is at least as much as the amount indicated in the sell offer. + x-custom-validation: + conditionalRequired: + - field: NFTokenBrokerFee + requires: + - NFTokenSellOffer + - NFTokenBuyOffer + message: 'Must be set if using brokered mode.' + requireOneOf: + - fields: + - NFTokenSellOffer + - NFTokenBuyOffer + greaterThan: + - field: NFTokenBrokerFee + value: 0 + message: 'Must be greater than 0; omit if there is no broker fee.' + NFTokenAcceptOfferErrorCode: + $id: NFTokenAcceptOfferErrorCode + type: string + enum: + - temDISABLED + - temMALFORMED + - tecCANT_ACCEPT_OWN_NFTOKEN_OFFER + - tecEXPIRED + - tecINSUFFICIENT_FUNDS + - tecINSUFFICIENT_PAYMENT + - tecOBJECT_NOT_FOUND + - tecNFTOKEN_BUY_SELL_MISMATCH + - tecNFTOKEN_OFFER_TYPE_MISMATCH + - tecNO_PERMISSION + x-enum-descriptions: + temDISABLED: The NonFungibleTokensV1 amendment is not enabled. + temMALFORMED: The transaction was not validly formatted. For example, it specified neither NFTokenSellOffer nor NFTokenBuyOffer, or it specified a negative NFTokenBrokerFee. + tecCANT_ACCEPT_OWN_NFTOKEN_OFFER: The buyer and seller are the same account. + tecEXPIRED: An offer specified in the transaction has already expired. + tecINSUFFICIENT_FUNDS: The buyer does not have the full amount they are offering. If the buy amount is specified in XRP, this could be because of the reserve requirement. If the buy amount is a token, it could be because the token is frozen. + tecINSUFFICIENT_PAYMENT: In brokered mode, the buy amount offered is not high enough to pay the BrokerFee and the sell cost of the NFToken. + tecOBJECT_NOT_FOUND: One of the offers specified in the transaction does not exist in the ledger. + tecNFTOKEN_BUY_SELL_MISMATCH: In brokered mode, the two offers are not a valid match. For example, the seller is asking more than the buyer is offering, the buy and sell offer are denominated in different assets, or the seller specified a destination that is not the buyer or the broker. + tecNFTOKEN_OFFER_TYPE_MISMATCH: The object identified by the NFTokenBuyOffer is not actually a buy offer, or the object identified by the NFTokenSellOffer is not actually a sell offer. + tecNO_PERMISSION: The seller does not own the NFToken being sold; or the matching offer specifies a different Destination account than the account accepting the offer. diff --git a/shared/transactions/nftoken_burn.yaml b/shared/transactions/nftoken_burn.yaml new file mode 100644 index 0000000..e85a928 --- /dev/null +++ b/shared/transactions/nftoken_burn.yaml @@ -0,0 +1,41 @@ +components: + schemas: + NFTokenBurnTransaction: + $id: NFTokenBurnTransaction + allOf: + - $ref: '../base.yaml#/components/schemas/BaseTransaction' + type: object + description: | + The NFTokenBurn transaction is used to remove a NFToken object from the NFTokenPage in which it is + being held, effectively removing the token from the ledger (burning it). + + The sender of this transaction must be the owner of the NFToken to burn; or, if the NFToken has the + lsfBurnable flag enabled, can be the issuer or the issuer's authorized NFTokenMinter account instead. + + If this operation succeeds, the corresponding NFToken is removed. If this operation empties the + NFTokenPage holding the NFToken or results in consolidation, thus removing a NFTokenPage, the owner’s + reserve requirement is reduced by one. + required: + - NFTokenID + properties: + NFTokenID: + type: string + description: | + The NFToken to be removed by this transaction. + Owner: + type: string + description: | + (Optional) The owner of the NFToken to burn. Only used if that owner is different than the account + sending this transaction. The issuer or authorized minter can use this field to burn NFTs that have + the lsfBurnable flag enabled. + NFTokenBurnErrorCode: + $id: NFTokenBurnErrorCode + type: string + enum: + - temDISABLED + - tecNO_ENTRY + - tecNO_PERMISSION + x-enum-descriptions: + temDISABLED: The NonFungibleTokensV1 amendment is not enabled. + tecNO_ENTRY: The specified TokenID was not found. + tecNO_PERMISSION: The account does not have permission to burn the token. diff --git a/shared/transactions/nftoken_cancel_offer.yaml b/shared/transactions/nftoken_cancel_offer.yaml new file mode 100644 index 0000000..eaa4edd --- /dev/null +++ b/shared/transactions/nftoken_cancel_offer.yaml @@ -0,0 +1,32 @@ +components: + schemas: + NFTokenCancelOfferTransaction: + $id: NFTokenCancelOfferTransaction + allOf: + - $ref: '../base.yaml#/components/schemas/BaseTransaction' + type: object + description: | + The NFTokenCancelOffer transaction can be used to cancel existing token offers created using NFTokenCreateOffer. + required: + - NFTokenOffers + properties: + NFTokenOffers: + type: array + items: + type: string + description: | + An array of IDs of the NFTokenOffer objects to cancel (not the IDs of NFToken objects, but the IDs + of the NFTokenOffer objects). Each entry must be a different object ID of an NFTokenOffer object; + the transaction is invalid if the array contains duplicate entries. + minLength: 1 + NFTokenCancelOfferErrorCode: + $id: NFTokenCancelOfferErrorCode + type: string + enum: + - temDISABLED + - temMALFORMED + - tecNO_PERMISSION + x-enum-descriptions: + temDISABLED: The NonFungibleTokensV1 amendment is not enabled. + temMALFORMED: The transaction was not validly formatted. For example, the NFTokenOffers array was empty or contained more than the maximum number of offers that can be canceled at one time. + tecNO_PERMISSION: At least one of the IDs in the NFTokenOffers field refers to an object that cannot be canceled. For example, the sender of this transaction is not the owner or Destination of the offer, or the object was not an NFTokenOffer type object. diff --git a/shared/transactions/nftoken_create_offer.yaml b/shared/transactions/nftoken_create_offer.yaml new file mode 100644 index 0000000..d8eeb55 --- /dev/null +++ b/shared/transactions/nftoken_create_offer.yaml @@ -0,0 +1,108 @@ +components: + schemas: + NFTokenCreateOfferTransaction: + $id: NFTokenCreateOfferTransaction + allOf: + - $ref: '../base.yaml#/components/schemas/BaseTransaction' + type: object + description: | + Creates either a new Sell offer for an NFToken owned by the account executing the transaction, or a new + Buy offer for an NFToken owned by another account. + + If successful, the transaction creates an NFTokenOffer object. Each offer counts as one object towards + the owner reserve of the account that placed the offer. + required: + - NFTokenID + - Amount + properties: + Owner: + type: string + description: | + (Optional) Who owns the corresponding NFToken. If the offer is to buy a token, this field must be + present and it must be different than the Account field (since an offer to buy a token one already + holds is meaningless). If the offer is to sell a token, this field must not be present, as the owner + is, implicitly, the same as the Account (since an offer to sell a token one doesn't already hold is meaningless). + NFTokenID: + type: string + description: | + Identifies the NFToken object that the offer references. + Amount: + type: object + description: | + Indicates the amount expected or offered for the corresponding NFToken. The amount must be non-zero, + except where this is an offer to sell and the asset is XRP; then, it is legal to specify an amount of zero, + which means that the current owner of the token is giving it away, gratis, either to anyone at all, or to + the account identified by the Destination field. + Expiration: + type: integer + format: uint32 + description: | + (Optional) Time after which the offer is no longer active, in seconds since the Ripple Epoch. + Destination: + type: string + description: | + (Optional) If present, indicates that this offer may only be accepted by the specified account. + Attempts by other accounts to accept this offer MUST fail. + x-custom-validation: + conditionalRequired: + - field: Owner + requiresFlag: tfSellNFToken + condition: false + message: 'Must be present for buy offers.' + conditionalForbidden: + - field: Owner + requiresFlag: tfSellNFToken + condition: true + message: 'Must not be present for sell offers.' + greaterThan: + - field: Amount + requiresFlag: tfSellNFToken + condition: false + value: 0 + message: 'Must be greater than 0 for a buy offer.' + notEqual: + - field: Destination + toField: Account + - field: Owner + toField: Account + NFTokenCreateOfferFlag: + $id: NFTokenCreateOfferFlag + type: string + enum: + - tfSellNFToken: 0x00000001 + x-enum-descriptions: + tfSellNFToken: If enabled, indicates that the offer is a sell offer. Otherwise, it is a buy offer. + NFTokenCreateOfferErrorCode: + $id: NFTokenCreateOfferErrorCode + type: string + enum: + - temDISABLED + - temBAD_AMOUNT + - temBAD_EXPIRATION + - tecDIR_FULL + - tecEXPIRED + - tecFROZEN + - tecINSUFFICIENT_RESERVE + - tecNO_DST + - tecNO_ENTRY + - tecNO_ISSUER + - tecNO_LINE + - tecNO_PERMISSION + - tecUNFUNDED_OFFER + - tefNFTOKEN_IS_NOT_TRANSFERABLE + description: Enum representing possible error codes for NFTokenCreateOffer transactions. + x-enum-descriptions: + temDISABLED: The NonFungibleTokensV1 amendment is not enabled. + temBAD_AMOUNT: The Amount field is not valid. For example, the amount was zero for a buy offer, or the amount is denominated in fungible tokens but the NFToken has the lsfOnlyXRP flag enabled. + temBAD_EXPIRATION: The specified Expiration time is invalid (for example, 0). + tecDIR_FULL: The sender already owns too many objects in the ledger, or there are already too many offers to buy or sell this token. + tecEXPIRED: The specified Expiration time has already passed. + tecFROZEN: The Amount is denominated in fungible tokens, but one of the trust lines that would receive tokens from this offer is frozen. This could be the seller's trust line or the NFToken's issuer's trust line (if the NFToken has a transfer fee). + tecINSUFFICIENT_RESERVE: The sender does not have enough XRP to meet the reserve requirement after placing this offer. + tecNO_DST: The account specified in the Destination field does not exist in the ledger. + tecNO_ENTRY: The NFToken is not owned by the expected account. + tecNO_ISSUER: The issuer specified in the Amount field does not exist. + tecNO_LINE: The Amount field is denominated in fungible tokens, but the NFToken's issuer does not have a trust line for those tokens and the NFToken does not have the lsfTrustLine flag enabled. + tecNO_PERMISSION: The Destination account blocks incoming NFTokenOffers. (Requires the DisallowIncoming amendment.) + tecUNFUNDED_OFFER: For a buy offer, the sender does have the funds specified in the Amount field available. If the Amount is XRP, this could be due to the reserve requirement; if the Amount is denominated in fungible tokens, this could be because they are frozen. + tefNFTOKEN_IS_NOT_TRANSFERABLE: The NFToken has the lsfTransferable flag disabled and this transaction would not transfer the NFToken to or from the issuer. diff --git a/shared/transactions/nftoken_mint.yaml b/shared/transactions/nftoken_mint.yaml new file mode 100644 index 0000000..785458b --- /dev/null +++ b/shared/transactions/nftoken_mint.yaml @@ -0,0 +1,108 @@ +components: + schemas: + NFTokenMintTransaction: + $id: NFTokenMintTransaction + allOf: + - $ref: '../base.yaml#/components/schemas/BaseTransaction' + type: object + description: | + The NFTokenMint transaction creates a non-fungible token and adds it to the relevant NFTokenPage + object of the NFTokenMinter as an NFToken object. This transaction is the only opportunity the + NFTokenMinter has to specify any token fields that are defined as immutable (for example, the TokenFlags). + required: + - NFTokenTaxon + properties: + NFTokenTaxon: + type: integer + format: uint32 + description: | + An arbitrary taxon, or shared identifier, for a series or collection of related NFTs. To mint a + series of NFTs, give them all the same taxon. + Issuer: + type: string + description: | + (Optional) The issuer of the token, if the sender of the account is issuing it on behalf of another + account. This field must be omitted if the account sending the transaction is the issuer of the NFToken. + If provided, the issuer's AccountRoot object must have the NFTokenMinter field set to the sender of this + transaction (this transaction's Account field). + TransferFee: + type: integer + format: uint16 + description: | + (Optional) The value specifies the fee charged by the issuer for secondary sales of the NFToken, + if such sales are allowed. Valid values for this field are between 0 and 50000 inclusive, allowing + transfer rates of between 0.00% and 50.00% in increments of 0.001. If this field is provided, the + transaction MUST have the tfTransferable flag enabled. + maximum: 50000 + URI: + type: string + description: | + (Optional) Up to 256 bytes of arbitrary data. In JSON, this should be encoded as a string of hexadecimal. + This is intended to be a URI that points to the data or metadata associated with the NFT. + maxLength: 512 + Amount: + type: object + description: | + (Optional) Indicates the amount expected or offered for the corresponding NFToken. The amount must be + non-zero, except where the asset is XRP; then, it is legal to specify an amount of zero. + Expiration: + type: integer + format: uint32 + description: | + (Optional) Time after which the offer is no longer active, in seconds since the Ripple Epoch. + Results in an error if the Amount field is not specified. + Destination: + type: string + description: | + (Optional) If present, indicates that this offer may only be accepted by the specified account. + Attempts by other accounts to accept this offer MUST fail. Results in an error if the Amount field + is not specified. + Flags: + type: integer + format: uint32 + description: | + Flags modifying the behavior of the transaction. See NFTokenMintFlag for details. + x-custom-validation: + notEqual: + - field: Issuer + toField: Account + message: 'Must not be the same as the account.' + requiredFlag: + - field: TransferFee + flag: tfTransferable + NFTokenMintFlag: + $id: NFTokenMintFlag + type: string + enum: + - tfBurnable: 0x00000001 + - tfOnlyXRP: 0x00000002 + - tfTrustLine: 0x00000004 + - tfTransferable: 0x00000008 + description: Enum representing flags for NFTokenMint transactions. + x-enum-descriptions: + tfBurnable: Allow the issuer (or an entity authorized by the issuer) to destroy the minted NFToken. (The NFToken's owner can always do so.) + tfOnlyXRP: The minted NFToken can only be bought or sold for XRP. + tfTrustLine: DEPRECATED Automatically create trust lines from the issuer to hold transfer fees received from transferring the minted NFToken. The fixRemoveNFTokenAutoTrustLine amendment makes it invalid to set this flag. + tfTransferable: The minted NFToken can be transferred to others. If this flag is not enabled, the token can still be transferred from or to the issuer, but a transfer to the issuer must be made based on a buy offer from the issuer and not a sell offer from the NFT holder. + NFTokenMintErrorCode: + $id: NFTokenMintErrorCode + type: string + enum: + - temDISABLED + - temBAD_NFTOKEN_TRANSFER_FEE + - temINVALID_FLAG + - temMALFORMED + - tecNO_ISSUER + - tecNO_PERMISSION + - tecINSUFFICIENT_RESERVE + - tecMAX_SEQUENCE_REACHED + description: Enum representing possible error codes for NFTokenMint transactions. + x-enum-descriptions: + temDISABLED: The NonFungibleTokensV1 amendment is not enabled. + temBAD_NFTOKEN_TRANSFER_FEE: The TransferFee is not within the acceptable range. + temINVALID_FLAG: The Flags value has bits enabled that are not allowed or valid flags. If the fixRemoveNFTokenAutoTrustLine amendment is enabled, the tfTrustLine flag causes this error. + temMALFORMED: The transaction was not validly specified. For example, the URI field is longer than 256 bytes. + tecNO_ISSUER: The Issuer refers to an account that does not exist in the ledger. + tecNO_PERMISSION: The account referenced by the Issuer field has not authorized this transaction's sender (using the NFTokenMinter setting) to mint on their behalf. + tecINSUFFICIENT_RESERVE: The owner would not meet the updated reserve requirement after minting the token. + tecMAX_SEQUENCE_REACHED: The Issuer's MintedNFTokens field is already at its maximum. This is only possible if 2^32-1 NFTokens have been minted in total by the issuer or on their behalf.