Submit Raw Transaction
Sandbox only, on testnets; not available in production. Sign a customer-built EVM transaction with an account’s wallet. In SIGN_ONLY mode, Bastion returns the signed transaction for you to broadcast, and assigns the nonce and estimates the gas limit and fees you leave out. In SIGN_AND_SUBMIT mode, Bastion picks the nonce, gas limit, and fees, broadcasts the transaction, and tracks it; poll Get Raw Transaction until its status is CONFIRMED, FAILED, or CANCELED.
Authorizations
Bearer authentication with an API token
Body
- eip1559_transaction
- legacy_transaction
Request identifier in a UUID format. Serves as an idempotency key.
[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 whose wallet signs the transaction
Testnet chain the transaction is for. The chain ID in the signed transaction is derived from this value.
CHAIN_UNSPECIFIED, ETHEREUM_MAINNET, POLYGON_MAINNET, ETHEREUM_TESTNET, OPTIMISM_SEPOLIA, BASE_MAINNET, BASE_SEPOLIA, OPTIMISM_MAINNET, POLYGON_AMOY, SOLANA_MAINNET, SOLANA_DEVNET "ETHEREUM_MAINNET"
What Bastion does with the transaction: SIGN_ONLY returns it signed for you to broadcast; SIGN_AND_SUBMIT broadcasts it for you.
MODE_UNSPECIFIED, SIGN_ONLY, SIGN_AND_SUBMIT "SIGN_ONLY"
Response
Success
- eip1559_transaction
- legacy_transaction
Unique identifier of the raw transaction
Request identifier supplied at creation
Account whose wallet signs the transaction
Chain the transaction is for
CHAIN_UNSPECIFIED, ETHEREUM_MAINNET, POLYGON_MAINNET, ETHEREUM_TESTNET, OPTIMISM_SEPOLIA, BASE_MAINNET, BASE_SEPOLIA, OPTIMISM_MAINNET, POLYGON_AMOY, SOLANA_MAINNET, SOLANA_DEVNET "ETHEREUM_MAINNET"
Mode supplied at creation
MODE_UNSPECIFIED, SIGN_ONLY, SIGN_AND_SUBMIT "SIGN_ONLY"
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.
STATUS_UNSPECIFIED, CREATED, SIGNED, SUBMITTED, CONFIRMED, FAILED, CANCELED "CREATED"
What the transaction is expected to do, estimated from the account's address before signing. Informational only: it never blocks signing.
Address that signs and sends the transaction
Nonce the transaction was signed at, as a decimal string; empty until signed
Gas limit the transaction was signed with, as a decimal string; empty until signed
Maximum total fee per gas the transaction was signed with, in wei, as a decimal string. Empty until signed and for a legacy transaction.
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 the transaction was signed with, in wei, as a decimal string. Empty until signed and for an EIP-1559 transaction.
Hash of the signed transaction; empty until signed. For a CANCELED transaction, the hash of the transaction that canceled it.
Why the transaction failed; set only when status is FAILED
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.