{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/debridge-com/json-schema/debridge-com-dln-order-create-tx-response-schema.json",
  "title": "DlnOrderCreateTxResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/create-tx.json#/components/schemas/DlnOrderCreateTxResponse",
  "type": "object",
  "properties": {
    "estimation": {
      "$ref": "#/$defs/DlnOrderEstimation"
    },
    "tx": {
      "$ref": "#/$defs/DlnTx"
    },
    "orderId": {
      "type": "string"
    },
    "prependedOperatingExpenseCost": {
      "type": "string"
    },
    "order": {
      "$ref": "#/$defs/Order"
    },
    "fixFee": {
      "type": "string"
    },
    "protocolFee": {
      "type": "string"
    },
    "protocolFeeApproximateUsdValue": {
      "type": "string"
    },
    "userPoints": {
      "type": "number"
    },
    "integratorPoints": {
      "type": "number"
    },
    "actualUserPoints": {
      "type": "number"
    },
    "actualIntegratorPoints": {
      "type": "number"
    },
    "estimatedTransactionFee": {
      "$ref": "#/$defs/FeeInfo"
    },
    "usdPriceImpact": {
      "type": "object"
    }
  },
  "required": [
    "estimation",
    "tx",
    "orderId",
    "order",
    "fixFee",
    "userPoints",
    "integratorPoints"
  ],
  "$defs": {
    "CostsDetailsProperty": {
      "type": "object",
      "properties": {
        "chain": {
          "type": "string"
        },
        "tokenIn": {
          "type": "string"
        },
        "tokenOut": {
          "type": "string"
        },
        "amountIn": {
          "type": "string"
        },
        "amountOut": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "payload": {
          "$ref": "#/$defs/Payload"
        }
      },
      "required": [
        "chain",
        "tokenIn",
        "tokenOut",
        "amountIn",
        "amountOut",
        "type"
      ]
    },
    "DlnOrderEstimation": {
      "type": "object",
      "properties": {
        "srcChainTokenIn": {
          "$ref": "#/$defs/SrcChainTokenInResponseType"
        },
        "srcChainTokenOut": {
          "$ref": "#/$defs/SrcChainTokenOutResponseType"
        },
        "dstChainTokenOut": {
          "$ref": "#/$defs/DstChainTokenOutResponseType"
        },
        "recommendedSlippage": {
          "type": "number"
        },
        "costsDetails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CostsDetailsProperty"
          }
        }
      },
      "required": [
        "srcChainTokenIn",
        "dstChainTokenOut",
        "costsDetails"
      ]
    },
    "DlnTx": {
      "type": "object",
      "properties": {
        "to": {
          "type": "string"
        },
        "data": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "gasLimit": {
          "type": "number"
        }
      },
      "required": [
        "to",
        "data",
        "value"
      ]
    },
    "DstChainTokenOutResponseType": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        },
        "decimals": {
          "type": "integer"
        },
        "amount": {
          "type": "string"
        },
        "chainId": {
          "type": "number"
        },
        "recommendedAmount": {
          "type": "string"
        },
        "withoutAdditionalTakerRewardsAmount": {
          "type": "string"
        },
        "withoutAdditionalTakerRewardsApproximateUsdValue": {
          "type": "number"
        },
        "approximateUsdValue": {
          "type": "number"
        },
        "recommendedApproximateUsdValue": {
          "type": "number"
        },
        "maxTheoreticalAmount": {
          "type": "string"
        },
        "maxTheoreticalApproximateUsdValue": {
          "type": "number"
        }
      },
      "required": [
        "address",
        "name",
        "symbol",
        "decimals",
        "amount",
        "chainId",
        "recommendedAmount",
        "maxTheoreticalAmount"
      ]
    },
    "FeeDetails": {
      "type": "object",
      "properties": {
        "giveOrderState": {
          "type": "string"
        },
        "giveOrderWallet": {
          "type": "string"
        },
        "nonceMaster": {
          "type": "string"
        },
        "txFee": {
          "type": "string"
        },
        "priorityFee": {
          "type": "string"
        },
        "gasLimit": {
          "type": "string"
        },
        "gasPrice": {
          "type": "string"
        },
        "baseFee": {
          "type": "string"
        },
        "maxFeePerGas": {
          "type": "string"
        },
        "maxPriorityFeePerGas": {
          "type": "string"
        }
      }
    },
    "FeeInfo": {
      "type": "object",
      "properties": {
        "total": {
          "type": "string"
        },
        "details": {
          "$ref": "#/$defs/FeeDetails"
        },
        "approximateUsdValue": {
          "type": "number",
          "description": "USD approximate value of the transaction fee"
        }
      },
      "required": [
        "total",
        "details"
      ]
    },
    "Order": {
      "type": "object",
      "properties": {
        "approximateFulfillmentDelay": {
          "type": "number"
        },
        "salt": {
          "type": "number"
        },
        "metadata": {
          "type": "string"
        }
      },
      "required": [
        "approximateFulfillmentDelay"
      ]
    },
    "Payload": {
      "type": "object",
      "properties": {
        "feeAmount": {
          "type": "string"
        },
        "feeBps": {
          "type": "string"
        },
        "amountOutBeforeCorrection": {
          "type": "string"
        },
        "estimatedVolatilityBps": {
          "type": "string"
        },
        "actualFeeAmount": {
          "type": "string"
        },
        "actualFeeBps": {
          "type": "string"
        },
        "subsidyAmount": {
          "type": "string"
        },
        "feeApproximateUsdValue": {
          "type": "string"
        },
        "additionalMarginAmount": {
          "type": "string"
        },
        "additionalMarginBps": {
          "type": "string"
        }
      }
    },
    "SrcChainTokenInResponseType": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        },
        "decimals": {
          "type": "integer"
        },
        "amount": {
          "type": "string"
        },
        "chainId": {
          "type": "number"
        },
        "approximateOperatingExpense": {
          "type": "string"
        },
        "mutatedWithOperatingExpense": {
          "type": "boolean"
        },
        "approximateUsdValue": {
          "type": "number"
        },
        "originApproximateUsdValue": {
          "type": "number"
        }
      },
      "required": [
        "address",
        "name",
        "symbol",
        "decimals",
        "amount",
        "chainId",
        "approximateOperatingExpense",
        "mutatedWithOperatingExpense",
        "approximateUsdValue",
        "originApproximateUsdValue"
      ]
    },
    "SrcChainTokenOutResponseType": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        },
        "decimals": {
          "type": "integer"
        },
        "amount": {
          "type": "string"
        },
        "chainId": {
          "type": "number"
        },
        "maxRefundAmount": {
          "type": "string"
        },
        "approximateUsdValue": {
          "type": "number"
        }
      },
      "required": [
        "address",
        "name",
        "symbol",
        "decimals",
        "amount",
        "chainId",
        "maxRefundAmount",
        "approximateUsdValue"
      ]
    }
  }
}