# Sending Transactions

## Creating, Signing, and Sending Transactions

To create, sign, and send a transaction with the Hyphen Android SDK, follow these steps:

```kotlin
// Define the Cadence script for the transaction
val cadenceScript = """
    transaction {
        execute {
            log("Hello World!!!")
        }
    }
""".trimIndent()

// Create, sign, and send the transaction
val txId = HyphenFlow.signAndSendTransaction(
    cadenceScript = cadenceScript,
    arguments = emptyList(),
    withAuthorizer = false
)

// Log the transaction ID
Log.e("Transaction ID", txId) // Outputs: "0x<TXID>"
```

#### Explanation:

* `cadenceScript`: The Cadence script to be executed in the transaction.
* `arguments`: List of arguments for the transaction. In this example, it's an empty list.
* `withAuthorizer`: A boolean indicating whether the transaction requires an authorizer. Set to `false` in this example.
* `txId`: The transaction ID returned by the `signAndSendTransaction` method.

## Utilities

### Wait for Transaction Seal

To wait for a transaction to be sealed on the Flow blockchain, you can use `waitForSeal` utility method.

```kotlin
val txId = FlowId(hex = "0x<TXID>")
val txResult = waitForSeal(txId = txId) // return FlowTransactionResult object
```

### Get Transaction Result

To retrieve the result of a specific transaction:

```kotlin
val txId = FlowId(hex = "0x<TXID>")
val txResult = getTransactionResult(txId = txId) // return FlowTransactionResult object
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyphen.at/android/sending-transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
