# Create Transaction And Wait

Create a new transaction and wait until transaction reaches given state.

Endpoint: POST /api/v1/transactions/create-and-wait
Version: 0.2.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

## Header parameters:

  - `x-signature` (string)
    Signature of the body. Base64 encoded string. If the request is made programatically by an API user, signing of the request is required and is intended to protect you from malicious backends. `x_signature` is valid for 120 seconds.

  - `x-timestamp` (integer)
    Timestamp of the signature. Integer. Specify an Epoch date. If the request is made programatically by an API user, the timestamp of the request is required and is intended to protect you from replay attacks.

  - `x-idempotence-id` (string)
    Optional idempotence ID of a transaction.

## Request fields (application/json):

  - `vault_id` (string, required)
    The unique identifier of the vault.

  - `note` (string)
    An optional transaction note.

  - `considered_as_stuck_after_seconds` (integer)
    The number of seconds after signing or pushing the transaction before it is eligible to be considered stuck. If omitted, the chain default is used. This field has no effect on message-only requests.

  - `signer_type` (string)
    Enum: "initiator", "api_signer", "end_user", "multiple_signers", "api_user"

  - `sign_mode` (string)
    Enum: "auto", "triggered"

  - `dapp_info` (object)

  - `dapp_info.url` (string, required)
    The URL of the dapp.

  - `dapp_info.name` (string, required)
    The name of the dapp.

  - `type` (string, required)
    Aptos message type.

  - `details` (object, required)

  - `details.type` (string, required)
    Personal message standard.

  - `details.should_include_address` (boolean, required)
    Whether the address should be included in the signed message.

  - `details.application` (string, required)
    The application that the message is for.

  - `details.should_include_application` (boolean, required)
    Whether the application should be included in the signed message.

  - `details.chain` (string, required)
    Enum: "aptos_mainnet", "aptos_testnet", "aptos_movement_mainnet", "aptos_movement_testnet"

  - `details.should_include_chain` (boolean, required)
    Whether the chain should be included in the signed message.

  - `details.message_to_sign` (string, required)
    The message to be signed, encoded in base64.
    Example: SGVsbG8=

  - `details.nonce` (string, required)
    The nonce of the message.

  - `timeout` (integer)
    The maximum time in seconds to wait for the transaction to reach the specified state. For states that require more than 50 seconds, using webhooks or polling is preferable.

  - `wait_for_state` (string, required)
    Enum: "waiting_for_approval", "waiting_for_signing_trigger", "approved", "finalized_for_signing", "signed", "sent_to_provider", "completed", "error_signing", "aborted", "error_submitting_to_provider", "dropped"

  - `type` (string, required)
    Aptos transaction type.

  - `type` (string, required)
    Arch transaction type.

  - `type` (string, required)
    Black Box signature type.

  - `type` (string, required)
    Canton transaction type.

  - `type` (string, required)
    Cosmos message type.

  - `type` (string, required)
    Cosmos transaction type.

  - `details` (any, required)
    Transaction details.

  - `details.type` (string, required)
    A cosmos raw transaction is for any operation.

  - `details.push_mode` (string)
    Enum: "auto", "manual", "deferred"

  - `details.request_data` (any, required)
    Request data.

  - `details.request_data.format` (string, required)

  - `details.request_data.messages` (array, required)
    List of messages in amino format.

  - `details.request_data.messages.type` (string, required)
    Message type.

  - `details.request_data.messages.value` (string, required)
    Message value.

  - `details.request_data.memo` (string)
    Transaction memo.

  - `details.request_data.std_fee` (object)

  - `details.request_data.std_fee.amount` (array, required)
    List of coins to pay for this transaction.

  - `details.request_data.std_fee.amount.denom` (string, required)
    Denom of this coin.

  - `details.request_data.std_fee.amount.amount` (string, required)
    Amount of this coin.
    Example: 1000000000000000000

  - `details.request_data.std_fee.gas` (string, required)
    Gas wanted for this transaction. Accepts an integer string (e.g. "200000") or a fractional string (e.g. "168908.4") — fractional values are rounded up to the next integer before being forwarded to the downstream service.
    Example: 1000000000000000000

  - `details.request_data.std_fee.payer` (string)
    Payer for this transaction.

  - `details.request_data.std_fee.granter` (string)
    Granter for this transaction.

  - `details.request_data.std_fee.fee_payer` (string)
    Fee Payer for this transaction.

  - `details.request_data.timeout_height` (integer)
    Timeout height for this transaction.

  - `details.request_data.body` (string, required)
    Body bytes, encoded in base64 format.
    Example: SGVsbG8=

  - `details.request_data.auth_info` (string, required)
    AuthInfo bytes, encoded in base64 format.
    Example: SGVsbG8=

  - `details.request_data.account_number` (string)
    Account number of signer.
    Example: 1000000000000000000

  - `details.type` (string, required)
    A Cosmos transfer transaction. A transaction of this kind is for transferring Cosmos assets.

  - `details.to` (any, required)
    The recipient of the transfer. Specify either a general address, the ID of another vault, or a contact ID.

  - `details.to.type` (string, required)

  - `details.to.address` (object, required)

  - `details.to.address.type` (string, required)

  - `details.to.address.address` (string, required)
    The address as bech32.
    Example: cosmos1tdk0g5d4ry9lq0erejttyufqcvwpqdj6tdql38

  - `details.to.address.hex_repr` (string)
    The hex representation of the address.
    Example: DBCE78FD2D006A3BAC2C548D93271ABA3D63F01E

  - `details.to.address.key_type` (string)
    Enum: "secp256k1", "ethsecp256k1"

  - `details.to.type` (string, required)
    The type of the recipient.

  - `details.to.contact_id` (string, required)
    The id of the address book contact.

  - `details.to.vault_id` (string, required)
    The id of the recipient vault.

  - `details.asset_identifier` (object, required)

  - `details.asset_identifier.type` (string, required)
    Cosmos asset identifier type.

  - `details.asset_identifier.details` (any, required)

  - `details.asset_identifier.details.type` (string, required)
    Cosmos asset identifier type.

  - `details.asset_identifier.details.type` (string, required)
    Token asset identifier type.

  - `details.asset_identifier.details.denom` (string, required)
    The denom of the asset.

  - `details.value` (any, required)
    Specify one of the following: `value``max`

  - `details.value.type` (string, required)

  - `details.value.value` (string, required)
    The specific amount to be passed.
    Example: 1000000000000000000

  - `details.memo` (string)
    Transaction memo.

  - `type` (string, required)
    EVM message type.

  - `type` (string, required)
    EVM transaction type.

  - `type` (string, required)
    Ripple transaction type.

  - `type` (string, required)
    Solana message type.

  - `type` (string, required)
    Solana transaction type.

  - `type` (string, required)
    Stacks transaction type.

  - `type` (string, required)
    Starknet message type.

  - `type` (string, required)
    Starknet transaction type.

  - `type` (string, required)
    Stellar message type.

  - `type` (string, required)
    Stellar transaction type.

  - `type` (string, required)
    Sui message type.

  - `type` (string, required)
    Sui transaction type.

  - `type` (string, required)
    TON message type.

  - `type` (string, required)
    TON transaction type.

  - `type` (string, required)
    TRON message type.

  - `type` (string, required)
    TRON transaction type.

  - `type` (string, required)
    Utxo message type.

  - `type` (string, required)
    UTXO transaction type.

## Response 201:

  - `201` (unknown)
    Successful Response

## Response 201 fields (application/json):

  - `id` (string, required)
    The unique identifier of the object in the Fordefi platform.

  - `created_at` (string, required)
    The date and time when the object was created.

  - `modified_at` (string, required)
    The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

  - `signatures` (array, required)
    The transaction signatures.

  - `state` (any, required)
    The state of the transaction.

  - `has_timed_out` (boolean, required)
    Whether the transaction has timed out while waiting for the requested state.

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `title` (string, required)
    Human-readable error message.

  - `detail` (string, required)
    Detailed error message.

  - `full_detail` (string)
    Full error message with additional details, if available.

  - `request_id` (string)
    Request ID - for debugging purposes.

  - `system_error_code` (string)
    An additional system error code in Fordefi.

  - `error_type` (string)
    Enum: "reverted_transaction", "partial_signed_raw_request", "blocked_by_policy", "transaction_contains_restricted_addresses", "vault_not_found", "missing_signed_raw_request", "redundant_signed_raw_request", "transaction_to_non_contract", "insecure_key_derivation", "invalid_signed_raw_request", "invalid_signer_type", "invalid_evm_message", "invalid_evm_transaction_data", "insufficient_funds", "vault_type_mismatch", "invalid_creator_type", "invalid_recipient", "dust_not_allowed", "invalid_gas_type", "insufficient_approvers", "funding_blocked_by_policy", "funder_not_allowed_for_transaction_type", "origin_vault_used_as_funder", "mixed_secure_and_non_secure_transactions", "invalid_push_mode", "chain_does_not_support_secure_node", "invalid_solana_secret_key", "invalid_solana_raw_transaction_accounts_field", "insufficient_gas_coins", "invalid_aptos_serialized_entry_point", "invalid_aptos_serialized_type", "invalid_aptos_rotate_key", "sui_package_address_not_found", "transaction_already_mined", "invalid_utxo_message_address_type", "invalid_starknet_vault_state", "missing_secret_key_or_recent_blockhash", "missing_secret_key_or_signature", "revoke_allowance_gas_limit_too_high", "chain_is_disabled", "priority_fee_already_set", "quote_not_found", "invalid_transaction_gas_config_field", "chain_is_not_supported", "gas_sponsor_not_enabled_for_organization", "chain_does_not_support_7702", "creating_user_operation_message_is_blocked", "transaction_fee_exceeds_limit", "transaction_not_pushable", "aml_not_configured", "transaction_not_frozen", "send_7702_transaction_to_self", "vault_is_not_smart_account", "invalid_canton_vault_registration_state", "failed_finding_wrapped_native_token", "sponsored_transactions_not_enabled", "custom_rpc_node_unavailable"

## Response 401:

  - `401` (unknown)
    Unauthorized User

## Response 401 fields (application/json):

  - `title` (string, required)
    Human-readable error message.

  - `detail` (string, required)
    Detailed error message.

  - `full_detail` (string)
    Full error message with additional details, if available.

  - `request_id` (string)
    Request ID - for debugging purposes.

## Response 403:

  - `403` (unknown)
    Forbidden User

## Response 403 fields (application/json):

  - `title` (string, required)
    Human-readable error message.

  - `detail` (string, required)
    Detailed error message.

  - `full_detail` (string)
    Full error message with additional details, if available.

  - `request_id` (string)
    Request ID - for debugging purposes.

## Response 408:

  - `408` (unknown)
    Request Timeout

## Response 408 fields (application/json):

  - `title` (string, required)
    Human-readable error message.

  - `detail` (string, required)
    Detailed error message.

  - `full_detail` (string)
    Full error message with additional details, if available.

  - `request_id` (string)
    Request ID - for debugging purposes.

## Response 422:

  - `422` (unknown)
    Validation Error

## Response 422 fields (application/json):

  - `title` (string, required)
    Human-readable error message.

  - `detail` (array, required)

  - `detail.loc` (array, required)

  - `detail.msg` (string, required)

  - `detail.type` (string, required)

  - `full_detail` (string)
    Full error message with additional details, if available.

  - `request_id` (string)
    Request ID - for debugging purposes.

## Response 429:

  - `429` (unknown)
    Rate Limit Exceeded

## Response 500:

  - `500` (unknown)
    Unexpected Error

## Response 500 fields (application/json):

  - `title` (string, required)
    Human-readable error message.

  - `detail` (string, required)
    Detailed error message.

  - `full_detail` (string)
    Full error message with additional details, if available.

  - `request_id` (string)
    Request ID - for debugging purposes.

