Create transaction

Transaction · Acts onchain

Constructs and compiles transaction calldata from structured inputs, returning a record ready for signing and submission. Hand it the steps of the transaction as action references with filled inputs and it resolves them through the catalog, compiles the calldata, and persists a transaction row that tracks the intent from here to settlement. The response carries everything a wallet needs to sign. This is the build step. Listing existing records is the GET on the same path, and the pure preview that persists nothing is the compile surface.

Send a request

Response

{
links: {
self: string
prev: string | undefined
next: string | undefined
} | undefined
headers: unknown | undefined
data: {
id: string
status: string
chain_id: number
address: string
value: string | integer | undefined
gas_limit: number | null
inputs: any[] | null
steps: any | null
created_at: string
updated_at: string
tx_hash: string | null
execution_mode: string | undefined
owner_address: string | undefined
plugs_hash: string | undefined
scheduler_status: string | undefined
last_error: string | undefined
verdict: string | undefined
failing_condition: number | undefined
last_simmed_block: number | undefined
outputs: any[] | null
relay: {
typed_data: {
types: Record<string, ({
name: string
type: string
})[]>
primaryType: string
domain: Record<string, any>
message: Record<string, any>
}
plugs: string[]
state: string[]
manifest: ({
token_in: string
token_out: string
amount_in: number
executor_slot: number
route_slot: number
})[]
} | null
} | null
}

Code samples

Language

Claude

Prompt

Call the Plug API endpoint "Create transaction".
## Endpoint
POST /address/{address}/transaction/
Base URL: https://api.plug.to
## Description
Constructs and compiles transaction calldata from structured inputs, returning a record ready for signing and submission.
Hand it the steps of the transaction as action references with filled inputs and it resolves them through the catalog, compiles the calldata, and persists a transaction row that tracks the intent from here to settlement. The response carries everything a wallet needs to sign.
This is the build step. Listing existing records is the GET on the same path, and the pure preview that persists nothing is the compile surface.
## Path Parameters
- address (string, required) — The EVM address to get information for. In the case that you request an address we have never indexed, we will immediately index it.
Current value: 0x62180042606624f02d8a130da8a3171e9b33894d
## Query Parameters
- input[chain_id] (integer, required) — The chain to create the transaction for.
- input[deadline] (integer, optional) — A unix timestamp after which the transaction is no longer valid.
- input[owner] (string, optional) — The account the draft executes for: a standard:wallet slot filled with "yourself" resolves to this address. Absent, the authenticated session's address; absent both, wallet-self slots stay on the executing account.
- input[gas_limit] (integer, optional) — Gas limit recorded on the created transaction.
- input[steps] (string, required) — The steps/actions to include in the transaction.
## Headers
- Accept (string, required) — For a typical single-time JSON response, set this to application/json. To receive realtime updates through a stream, set this to text/event-stream. (default: application/json) [application/json, text/event-stream]
Current value: application/json
## Response Schema
- links (object, optional)
- self (string, required)
- prev (string, optional)
- next (string, optional)
- headers (unknown, optional)
- data (object, optional)
- id (string, required)
- status (string, required)
- chain_id (integer, required)
- address (string, required)
- value (string | integer, optional)
- gas_limit (integer, optional)
- inputs (array of any, optional)
- steps (any, optional)
- created_at (string, required)
- updated_at (string, required)
- tx_hash (string, optional)
- execution_mode (string, optional)
- owner_address (string, optional)
- plugs_hash (string, optional)
- scheduler_status (string, optional)
- last_error (string, optional)
- verdict (string, optional)
- failing_condition (integer, optional)
- last_simmed_block (integer, optional)
- outputs (array of any, optional)
- relay (object, optional)
- typed_data (object, required)
- types (Record<string, array>, required)
- primaryType (string, required)
- domain (Record<string, any>, required)
- message (Record<string, any>, required)
- plugs (array of string, required)
- state (array of string, required)
- manifest (array
- token_in (string, required)
- token_out (string, required)
- amount_in (integer, required)
- executor_slot (integer, required)
- route_slot (integer, required), required)
## Example Request
POST https://api.plug.to/address/0x62180042606624f02d8a130da8a3171e9b33894d/transaction/