Assemble transaction

post

Assembles a transaction using the provided authorization token and request body.

Authorizations
Header parameters
AuthorizationstringRequired
  • The authorization token from the request header.
Body
  • The request body containing the transaction details.
userAddrstringRequired

The address of the user making the request.

pathIdstringRequired

The ID of the path to be assembled.

simulatebooleanOptional

Whether to simulate the transaction.

receiverstringOptional

The address of the receiver, if any.

Responses
200
A promise that resolves to an `OdosAPIResponse` containing the result of the transaction assembly.
application/json
post
POST //odos/assemble-transaction HTTP/1.1
Host: beta.usemoon.ai
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "userAddr": "text",
  "pathId": "text",
  "simulate": true,
  "receiver": "text"
}
200

A promise that resolves to an OdosAPIResponse containing the result of the transaction assembly.

{
  "success": true,
  "message": "text",
  "data": {
    "approve": null,
    "broadcasted": {
      "success": true,
      "message": "text",
      "data": "text"
    },
    "odos": null,
    "message": "text",
    "success": true,
    "user_op": "text",
    "data": null,
    "params": [],
    "function": "text",
    "transaction": {
      "data": "text",
      "value": "text",
      "to": "text",
      "from": "text",
      "gasPrice": "text",
      "gasLimit": "text",
      "nonce": 1,
      "chainId": "text",
      "maxPriorityFeePerGas": "text",
      "maxFeePerGas": "text",
      "type": 1
    }
  }
}