Skip to main content
POST
Submit Raw Transaction

Authorizations

Authorization
string
header
required

Bearer authentication with an API token

Body

application/json
request_id
string<uuid>
required

Request identifier in a UUID format. Serves as an idempotency key.

Pattern: [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
account_id
string
required

Account whose wallet signs the transaction

chain
enum<string>
required

Testnet chain the transaction is for. The chain ID in the signed transaction is derived from this value.

Available options:
CHAIN_UNSPECIFIED,
ETHEREUM_MAINNET,
POLYGON_MAINNET,
ETHEREUM_TESTNET,
OPTIMISM_SEPOLIA,
BASE_MAINNET,
BASE_SEPOLIA,
OPTIMISM_MAINNET,
POLYGON_AMOY,
SOLANA_MAINNET,
SOLANA_DEVNET
Example:

"ETHEREUM_MAINNET"

mode
enum<string>
required

What Bastion does with the transaction: SIGN_ONLY returns it signed for you to broadcast; SIGN_AND_SUBMIT broadcasts it for you.

Available options:
MODE_UNSPECIFIED,
SIGN_ONLY,
SIGN_AND_SUBMIT
Example:

"SIGN_ONLY"

eip1559_transaction
eip1559_transaction · object

Response

Success

eip1559_transaction
eip1559_transaction · object
id
string
read-only

Unique identifier of the raw transaction

request_id
string

Request identifier supplied at creation

account_id
string

Account whose wallet signs the transaction

chain
enum<string>

Chain the transaction is for

Available options:
CHAIN_UNSPECIFIED,
ETHEREUM_MAINNET,
POLYGON_MAINNET,
ETHEREUM_TESTNET,
OPTIMISM_SEPOLIA,
BASE_MAINNET,
BASE_SEPOLIA,
OPTIMISM_MAINNET,
POLYGON_AMOY,
SOLANA_MAINNET,
SOLANA_DEVNET
Example:

"ETHEREUM_MAINNET"

mode
enum<string>

Mode supplied at creation

Available options:
MODE_UNSPECIFIED,
SIGN_ONLY,
SIGN_AND_SUBMIT
Example:

"SIGN_ONLY"

status
enum<string>

Status of a raw transaction.

  • STATUS_UNSPECIFIED: Not known yet; keep polling.
  • CREATED: Stored, but not yet signed or broadcast. In SIGN_ONLY mode, signing did not complete: retry the request with the same request_id. In SIGN_AND_SUBMIT mode, Bastion is preparing to broadcast it.
  • SIGNED: Signed. SIGN_ONLY mode only: Bastion does not broadcast, so the transaction stays SIGNED.
  • SUBMITTED: SIGN_AND_SUBMIT mode only. Broadcast and waiting to be mined.
  • CONFIRMED: SIGN_AND_SUBMIT mode only. Mined and succeeded. Final.
  • FAILED: SIGN_AND_SUBMIT mode only. Mined and reverted, or never mined: it could not be signed or broadcast, or another transaction used its nonce. failure_reason says which. Final.
  • CANCELED: SIGN_AND_SUBMIT mode only. The transaction was stuck, so Bastion mined an empty transaction at its nonce in its place. It will never run. Final.

New statuses may be added; treat an unknown value as not yet final.

Available options:
STATUS_UNSPECIFIED,
CREATED,
SIGNED,
SUBMITTED,
CONFIRMED,
FAILED,
CANCELED
Example:

"CREATED"

preview
preview · object

What the transaction is expected to do, estimated from the account's address before signing. Informational only: it never blocks signing.

from_address
string
read-only

Address that signs and sends the transaction

nonce
string
read-only

Nonce the transaction was signed at, as a decimal string; empty until signed

gas_limit
string
read-only

Gas limit the transaction was signed with, as a decimal string; empty until signed

max_fee_per_gas
string
read-only

Maximum total fee per gas the transaction was signed with, in wei, as a decimal string. Empty until signed and for a legacy transaction.

max_priority_fee_per_gas
string
read-only

Maximum priority fee per gas the transaction was signed with, in wei, as a decimal string. Empty until signed and for a legacy transaction.

gas_price
string
read-only

Gas price the transaction was signed with, in wei, as a decimal string. Empty until signed and for an EIP-1559 transaction.

transaction_hash
string
read-only

Hash of the signed transaction; empty until signed. For a CANCELED transaction, the hash of the transaction that canceled it.

failure_reason
string
read-only

Why the transaction failed; set only when status is FAILED

created_at
string
read-only
updated_at
string
read-only
signed_transaction
string
read-only

Signed transaction, 0x-prefixed, ready for eth_sendRawTransaction. Returned by Submit Raw Transaction in SIGN_ONLY mode; empty in SIGN_AND_SUBMIT mode, where Bastion broadcasts it.